Graphics Programs Reference
In-Depth Information
First, we'll look at the sections of the file (in the order in which they appear) and then
we'll put them together and run pdftk to make a valid PDF file.
File Header
The file header usually consists of two lines. The first identifies the file as a PDF and
gives its version number:
%PDF-1.0 PDF version 1.0 header
The second line is hard to type into a text editor since it contains nonprintable char-
acters. We'll have pdftk do this for us.
Main Objects
On to the main body of the fileā€”the objects. The first is the page list , which is a dic-
tionary linking to the page objects in the document.
1 0 obj Object 1
<< /Type /Pages It's a page list
/Count 1 There is one page
/Kids [2 0 R] List of object numbers of pages. Just object 2 here.
>>
endobj End of object 1
Next up is the page . Again, it's a dictionary. It contains the paper size, an indirect
reference back to the page list, and to the graphical content and resources .
2 0 obj
<< /Type /Page It's a page
/MediaBox [0 0 612 792] Paper size is US Letter Portrait (612 points by 792 points)
/Resources 3 0 R Reference to resources at object 3
/Parent 1 0 R Reference back up to parent page list
/Contents [4 0 R] Graphical content is in object 4
>>
endobj
Now, the resources . Here, there is just one entry, the font dictionary , which in our
example contains a single font, which we're going to use to write some text on the page.
3 0 obj
<< /Font The font dictionary
<< /F0 Just one font, called /F0
<< /Type /Font These three lines reference the built-in font Times Italic
/BaseFont /Times-Italic
/Subtype /Type1 >>
>>
>>
endobj
Search WWH ::




Custom Search