Documentation
¶
Overview ¶
Package pdfx reads and stamps the PDFs Chrome prints for lfm: page counts, outline targets, transparency and the provenance stamp that lets a later compile reuse a print.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FigurePages ¶ added in v0.1.12
FigurePages counts the distinct pages occupied by each labelled figure in Chrome's tagged PDF. A figure painted on multiple pages has been split.
func OutlinePages ¶
OutlinePages returns the page number (from 1) of every top-level bookmark of a PDF Chrome printed with a document outline, in order. Chrome builds the outline from the headings, so a book's chapters are its last entries. It returns nil when the structure cannot be read.
func PageCount ¶
PageCount returns the number of pages of a PDF: the largest /Count of a page tree node, or, without one, the number of page objects. Chrome writes its page tree uncompressed, which is all lfm needs to read.
func Stamp ¶
Stamp records key in a PDF's document information, the inputs it was printed from, as an incremental update: the printed bytes stay untouched and the file stays a valid PDF. A later compile reuses the file when its key still matches instead of printing it again.
func Transparent ¶
Transparent reports whether a PDF Chrome printed contains transparency: partial opacity or images with an alpha channel. Printers want it flattened. It looks only where an opacity or mask key starts, so a large PDF is scanned at memory speed.
Types ¶
This section is empty.