Expand description
\pdfextension (LuaTeX manual §3.2.2): PDF literals, matrices,
colour stacks, objects, annotations, links, destinations, outlines and
document-level dictionaries.
Commands that act at shipout become whatsit nodes in the current list;
document-level data is collected in PdfState for the backend.
§Object numbers
The engine and the PDF writer share one object counter
(PdfState::counter), so the numbers TeX and Lua see
(\pdffeedback lastobj, pdf.getpageref, …) are those in the file.
Observed in LuaTeX 1.22:
\pdfextension annotandstartlinktake their number when they are scanned; continuation rectangles of a link get theirs at shipout.- A named or numbered destination gets its number the first time it is
referred to (by an outline or open action when it is scanned, by a
link when the page is written) or met at shipout, whichever comes
first. Pages likewise (
goto page,\pdffeedback pageref). \pdfextension outlineallocates the action (written at once), the numbers of the destination it refers to, the entry, and the title (written at once as(title)and a newline).- Destinations that were referred to but never defined are written at
the end as
[ last-page 0 R /Fit ], in the reverse order of their allocation, each with a warning.
Modules§
- colorstack_
cmd - Colour-stack commands.
- literal_
mode - Literal modes (
modeofpdf_literalwhatsits).
Structs§
- Active
Link - A link whose
\pdfextension endlinkhas not been shipped yet. - Color
Stack - Colour-stack definition.
- Dest
Entry - A destination known by its identifier.
- Dest
View - The view of
\pdfextension dest. - DocItems
- Document-level items computed at the end of the run for the backend.
- Late
LuaContext - State of the
\lateluacall being executed at shipout. - Link
Piece - One rectangle of a link, as written.
- LuaPdf
Texts - Dictionary texts set from Lua (
pdf.setcatalogand friends). They are independent of the token lists set at the TeX end and are written after them;Nonemeans never set (the getters returnnil). - Outline
- An outline entry (
\pdfextension outline). - Page
Items - The interactive items of the page being shipped, handed to the backend when the page ends.
- PdfObject
- A PDF object created with
\pdfextension obj. - PdfState
- Document-level PDF state.
Enums§
- Action
Target - What an action refers to.
- DestId
- Identifies a destination (
name {…}ornum n). - Dest
Kind - The destination types of
\pdfextension dest. - DestPos
- A destination’s view in page coordinates (sp), for the backend.
- ObjKind
- Kinds of PDF object numbers, as
pdf.getobjtypenames them. - PdfAction
- An action specification (
user,goto,thread).
Type Aliases§
- Annot
Body - An annotation’s rectangle (sp, page coordinates) and text.