APPENDIX G
G
Example PDF Files
This appendix presents several examples showing the structure of actual PDF
files:
•
A minimal file that can serve as a starting point for creating other PDF files
(and that is the basis of later examples)
•
A simple example that shows a text string—the classic “Hello World”—and a
simple graphics example that draws lines and shapes
•
A fragment of a PDF file that illustrates the structure of the page tree for a large
document and, similarly, two fragments that illustrate the structure of an out-
line hierarchy
•
An example showing the structure of a PDF file as it is updated several times,
illustrating multiple body sections, cross-reference sections, and trailers
Note:
The
Length
values of stream objects in the examples and the byte addresses in
cross-reference tables are not necessarily accurate.
G.1 Minimal PDF File
acceptable PDF file. It is not strictly the minimum acceptable because it contains
an outline dictionary (
Outlines
in the document catalog) with a zero count (in
which case this object would normally be omitted); a page content stream
(
Contents
in the page object); and a resource dictionary (
Resources
in the page
object) containing a
ProcSet
array. These objects were included to make this file
useful as a starting point for creating other, more realistic PDF files.
1057