Graphics Programs Reference
In-Depth Information
spection. This has the side effect of writing them without object and cross-reference
streams. See Chapter 9 for details.
Linearized PDF
When viewing a large PDF file in a network environment, especially when the data rate
is low or the network latency high, the user does not want to wait for the whole file to
download to view it. This is especially important when the document is being viewed
inside a web browser.
We should like the first page to appear quickly, and for changing to another page (by
clicking on a hyperlink or a bookmark) to be as fast as possible. In the case of individual
pages being large (rather than just the whole document), we should like page content
to appear incrementally, most-important content first. Network transport mechanisms
such as HTTP (The HyperText Transfer Protocol, used for fetching web pages in a web
browser) often allow an arbitrary chunk of data to be fetched. However, because of
latency, we wish to fetch a single chunk with all the data for a page, rather than hundreds
of little chunks, one for each object.
PDF 1.2 introduced such a mechanism, linearized PDF . This adds rules for how to order
objects in a file and hint tables to indicate how such objects have been ordered. The
system is backward compatible, so that a linearized PDF file is also a normal one, and
may be read as such by a reader which does not understand linearized PDF.
A linearized PDF file can be recognized by the presence of a linearization dictionary at
the top of the file, directly after the header. For example:
%PDF-1.4
%âãÏÓ
4 0 obj
<< /E 200967
/H [ 667 140 ]
/L 201431
/Linearized 1
/N 1
/O 7
/T 201230
>>
endobj
The pdfopt command line program shipped with GhostScript can linearize a file. For
example:
pdfopt input.pdf output.pdf
This linearizes input.pdf and writes the result to output.pdf .
Search WWH ::




Custom Search