Expand description
Document layer: the page tree, metadata, outlines and attachments on top of the syntax layer’s lazily parsed objects, a copy-on-write overlay for edits, and full and incremental save.
Structs§
- Attachment
- An embedded file from the
/EmbeddedFilesname tree. - Attachment
Options - Options for
Document::add_attachment. - Document
- A document opened for reading.
- Encryption
- Encryption for a full save: always AES-256 (revision 6).
- Info
- The document information dictionary (§14.3.3), decoded.
- Outline
Item - One outline (bookmark) item.
- Page
- One page, with inherited attributes resolved.
- Rect
- A rectangle
[llx lly urx ury], normalized sollx <= urxandlly <= ury. - Sanitize
Options - What
Document::sanitizeremoves.SanitizeOptions::defaultremoves everything that can run or hide data, and keeps links and metadata. - Sanitize
Report - How many items of each kind were removed.
- Save
Options - Options for
Document::save. - Store
- Base file plus overlay.
Enums§
- Save
Mode - How to save.
Functions§
- decode_
text_ string - Decodes a text string: UTF-16BE with a BOM, UTF-8 with a BOM (PDF 2.0), otherwise PDFDocEncoding. UTF-16LE with a BOM, which some writers emit, is accepted too. Undecodable units become U+FFFD.
- encode_
text_ string - Encodes a text string: PDFDocEncoding when every character has a byte there, otherwise UTF-16BE with a byte order mark (works in every version).
- import
- Deep-copies
objectfromsrcintodst, giving every referenced object a new number indst.mapcarries ids already copied (and pre-assigned ones), so shared objects are copied once and cycles end. - name_
tree - Every (key, value) pair of a name tree (§7.9.6), in tree order.
- pdf_
doc_ char - One PDFDocEncoding byte (Annex D.2).