0% found this document useful (0 votes)
6 views30 pages

Intro Handbook IT5 Vol1

The document contains multiple instances of the phrase 'Hello World' formatted in various ways, including different color spaces and font styles. It also includes examples of PDF structure, such as objects, streams, and basic building blocks of a PDF file. Overall, it serves as a demonstration of PDF formatting and content representation.

Uploaded by

pefakix278
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views30 pages

Intro Handbook IT5 Vol1

The document contains multiple instances of the phrase 'Hello World' formatted in various ways, including different color spaces and font styles. It also includes examples of PDF structure, such as objects, streams, and basic building blocks of a PDF file. Overall, it serves as a demonstration of PDF formatting and content representation.

Uploaded by

pefakix278
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Hello World

Hello World

%PDF-1.2 3 0 obj 5 0 obj


1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
(Hello World)Tj <<
ET /Root 6 0 R
endstream >>
endobj

Example 01 Page 1
Hello World

%PDF-1.2 3 0 obj 5 0 obj


1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
(Hello World)Tj <<
ET /Root 6 0 R
endstream >>
endobj

Example 01 Page 2
Hello World
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
(Hello World)Tj <<
ET /Root 6 0 R
endstream >>
endobj

Example 01 Page 2
bc
Objects Form a Graph
60R 50R

/Root /Catalog /Pages

10R 16 0 R

/Page /Page

40R 30R 20R

/Font /Resources /Contents

8
Hello World
Hello World - 50% Gray
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
0.5 g <<
(Hello World)Tj /Root 6 0 R
ET >>
endstream
endobj

Example 02 Page 1
Postfix Notation

operand-1 operand-2 operand-3 operator

3 4 add --> 7
3 4 add 3 mult --> 21

scale-x skew-x skew-y scale-y move-x move-y Tm

1 0 0 1 260 254 Tm

gray-level g

0.5 g

string Tj

(Hello World) Tj

font-internal-name size Tf

/F1 24 Tf
Hello World - 50% Gray
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
0.5 g <<
(Hello World)Tj /Root 6 0 R
ET >>
endstream
endobj

Example 02 Page 2
Hello World
(612, 792)
792
Y

•(260, 600)

1/72 inch

X
8.5 x 11 inches 612
Hello World - 50% Gray
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
0.5 g <<
(Hello World)Tj /Root 6 0 R
ET >>
endstream
endobj

Example 02 Page 3
Basic PDF Building Blocks

(Hello World) ........... Strings


-- enclosed in ( )
12 4.55 .............. Numbers
/Dog Names
[ /Dog 12 (a word) ] Arrays
-- enclosed in [ ]
<< /Size 12 /Color /red >> Dictionaries
-- enclosed in << >>
1 0 R 5 2 R 129 0 R ... References (pointers)

Page 1
Nesting
[
<<
/Name (Jim)
/Age 39
/Children [(Heather) (Timothy) (Rebecca)]
>>
22
44.55
]

<<
/MORE [ 22 33 44 55 1 ]
/LESS [ (dog) (cat) (mule) ]
/count 88
>>

Page 2
Objects
3 0 obj
(a string object)
endobj

Direct versus Indirect Objects


<< /dog (a labrador) >>

can also be

<< /dog 4 0 R >>


...
4 0 obj
(a labrador)
endobj

Page 3
Stream Objects
55 1 obj
<<
/Length 31
/Type /Content
/special (true)
>>
stream
this is the stream’s content
endstream
endobj

Page 4
Hello World - 50% Gray
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R >> /MediaBox
/Contents 2 0 R endobj [ 0 0 612 446 ]
>> >>
endobj 4 0 obj endobj
<<
2 0 obj /Type /Font 6 0 obj
<< /Subtype /Type1 <<
/Length 51 /Name /F1 /Type /Catalog
>> /BaseFont/Helvetica /Pages 5 0 R
stream >> >>
BT endobj endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
0.5 g <<
(Hello World)Tj /Root 6 0 R
ET >>
endstream
endobj

Example 02 Page 5
Hello World
Hello World - Device Dependent 100% Red

%PDF-1.2 3 0 obj 5 0 obj


1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R >> /Kids [ 1 0 R ]
/Parent 5 0 R >> /Count 1
/Resources 3 0 R endobj /MediaBox
/Contents 2 0 R [ 0 0 612 446 ]
>> 4 0 obj >>
endobj << endobj
/Type /Font
2 0 obj /Subtype /Type1 6 0 obj
<< /Name /F1 <<
/Length 51 /BaseFont/Helvetica /Type /Catalog
>> >> /Pages 5 0 R
stream endobj >>
BT endobj
/F1 24 Tf
1 0 0 1 260 254 Tm trailer
1 0 0 rg <<
(Hello World)Tj /Root 6 0 R
ET >>
endstream
endobj
Example 03 Page 1
Hello World
Hello World -- L*a*b* Red
%PDF-1.2 3 0 obj 5 0 obj
1 0 obj << <<
<< /ProcSet[/PDF/Text] /Type /Pages
/Type /Page /Font <</F1 4 0 R>> /Kids [ 1 0 R ]
/Parent 5 0 R /ColorSpace /Count 1
/Resources 3 0 R <</CS1 /MediaBox
/Contents 2 0 R [ /Lab << [ 0 0 612 446 ] >>
>> /Range endobj
endobj [-128 127 -128 127]
/WhitePoint 6 0 obj
2 0 obj [0.951 1 1.089] <<
<< /Length 51 >> ] /Type /Catalog
>> >> /Pages 5 0 R
stream >> >>
BT endobj endobj
/F1 24 Tf
1 0 0 1 260 254 Tm 4 0 obj trailer
/CS1 cs << <<
/ AbsoluteColormetric /Type /Font /Root 6 0 R
ri /Subtype /Type1 >>
63 127 127 sc /Name /F1
(Hello World)Tj /BaseFont/Helvetica
ET >>
endstream endobj
endobj
Example 04
3 0 obj
<<
/ProcSet[/PDF/Text]
/Font <</F1 4 0 R>>
/ColorSpace
<</CS1
[ /Lab <<
/Range [-128 127 -128 127]
/WhitePoint [0.951 1 1.089]
>>
]
>>
>>
endobj
Hello World
Hello World -- Calibrated RGB Red

%PDF-1.2 3 0 obj 5 0 obj


1 0 obj <</ProcSet[/PDF/Text] <<
<< /Font <</F1 4 0 R>> /Type /Pages
/Type /Page /ColorSpace << /CS2 /Kids [ 1 0 R ]
/Parent 5 0 R [ /CalRGB << /Gamma /Count 1
/Resources 3 0 R [2.222 2.222 2.222] /MediaBox
/Contents 2 0 R /Matrix [ 0 0 612 446 ] >>
>> [0.412 0.213 0.019 endobj
endobj 0.358 0.715 0.119
0.181 0.072 0.951 6 0 obj
2 0 obj ] /WhitePoint <<
<< /Length 51 [0.951 1 1.089]>> /Type /Catalog
>> ] /Pages 5 0 R
stream >> >> >>
BT endobj endobj
/F1 24 Tf
1 0 0 1 260 254 Tm 4 0 obj trailer
/CS2 cs <</Type /Font <<
1 0 0 sc /Subtype /Type1 /Root 6 0 R
(Hello World)Tj /Name /F1 >>
ET /BaseFont/Helvetica
endstream >>
endobj endobj
Example 05 Page 1
3 0 obj
<<
/ProcSet[/PDF/Text]
/Font <</F1 4 0 R>>
/ColorSpace
<</CS2
[ /CalRGB <<
/Gamma [2.222 2.222 2.222]
/Matrix [0.412 0.213 0.019
0.358 0.715 0.119
0.181 0.072 0.951]
/WhitePoint[0.951 1 1.089]
>>
]
>>
>>
endobj
Hello World
Blue Star
%PDF-1.2 2 0 obj 3 0 obj
1 0 obj << /Length 51 >> <<
<< stream /ProcSet[/PDF/Text]
/Type /Page BT /Font <</F1 4 0 R >>
/Parent 5 0 R /F1 24 Tf >>
/Resources 3 0 R 1 0 0 1 260 254 Tm endobj
/Contents 2 0 R (Hello World)Tj
>> ET 4 0 obj
endobj <<
0 0 1 rg /Type /Font
315 226 m /Subtype /Type1
299 182 l /Name /F1
339 208 l /BaseFont/Helvetica
291 208 l >>
331 182 l endobj
f
endstream
endobj

Example 06 Page 1
(0,446) (612,446)
Y
(315,226)

(291,208) (339,208) 0 0 1 setrgbcolor


315 226 moveto
299 182 lineto
339 208 lineto
291 208 lineto
(299,182) (331,182) 331 182 lineto
fill

(612,0)
X
Blue Star
%PDF-1.2 2 0 obj 3 0 obj
1 0 obj << /Length 51 >> <<
<< stream /ProcSet[/PDF/Text]
/Type /Page BT /Font <</F1 4 0 R >>
/Parent 5 0 R /F1 24 Tf >>
/Resources 3 0 R 1 0 0 1 260 254 Tm endobj
/Contents 2 0 R (Hello World)Tj
>> ET 4 0 obj
endobj <<
0 0 1 rg /Type /Font
315 226 m /Subtype /Type1
299 182 l /Name /F1
339 208 l /BaseFont/Helvetica
291 208 l >>
331 182 l endobj
f
endstream
endobj

Example 06 Page 1
Blue Star
5 0 obj
<<
/Type /Pages
/Kids [ 1 0 R ]
/Count 1
/MediaBox
[ 0 0 612 446 ] >>
endobj

6 0 obj
<<
/Type /Catalog
/Pages 5 0 R
>>
endobj

trailer
<<
/Root 6 0 R
>>

Example 06 Page 2

You might also like