Download Guide for pdflatex
Transcript
The pdfTEX user manual
The object is kept in memory and will be written to the pdf output only when its number is referred to by
\pdfrefobj or when \pdfobj is preceded by \immediate. Nothing is appended to the list being built. The
number of the most recently created object is accessible via \pdflastobj.
I
\pdflastobj (read--only integer)
This command returns the object number of the last object created by \pdfobj.
I
\pdfrefobj hobject numberi
This command appends a whatsit node to the list being built. When the whatsit node is searched at shipout
time, pdfTEX will write the object hobject numberi to the pdf output if it has not been written yet.
7.5
I
Page and pages objects
\pdfpagesattr (tokens)
pdfTEX expands this token list when it finishes the pdf output and adds the resulting character stream to the
root Pages object. When defined, these are applied to all pages in the document. Some examples of attributes
are /MediaBox, the rectangle specifying the natural size of the page, /CropBox, the rectangle specifying the
region of the page being displayed and printed, and /Rotate, the number of degrees (in multiples of 90) the
page should be rotated clockwise when it is displayed or printed.
\pdfpagesattr
{ /Rotate 90
/CropBox [0 0 612 792] }
I
% rotate all pages by 90 degrees
% the crop size of all pages (in bp)
\pdfpageattr (tokens)
This is similar to \pdfpagesattr, but has priority over it. It can be used to override any attribute given
by \pdfpagesattr for individual pages. The token list is expanded when pdfTEX ships out a page. The
contents are added to the attributes of the current page.
I
\pdfpageref hpage numberi (expandable)
This primitive expands to the number of the page object that contains the dictionary for page hpage numberi .
If the page hpage numberi does not exist, a warning will be issued, a fresh unused pdf object will be generated,
and \pdfpageref will expand to that object number.
E. g., if the dictionary for page 5 of the TEX document is contained in pdf object no. 18, \pdfpageref5
expands to the number 18.
7.6
Form XObjects
The next three primitives support a pdf feature called ‘object reuse’ in pdfTEX. The idea is first to create
a ‘form XObject’ in pdf. The content of this object corresponds to the content of a TEX box; it can contain
pictures and references to other form XObjects as well. After creation, the form XObject can be used multiple
times by simply referring to its object number. This feature can be useful for large documents with many
similar elements, as it can reduce the duplication of identical objects.
These commands behave similarly to \pdfobj, \pdfrefobj and \pdflastobj, but instead of taking raw
pdf code, they handle text typeset by TEX.
I
\pdfxform [ hattr speci ] [ hresources speci ] hbox numberi
This command creates a form XObject corresponding to the contents of the box hbox numberi . The box
can contain other raw objects, form XObjects, or images as well. It can however not contain annotations
27