Expand description
lopdf — PDF document manipulation library (forked for XFA project).
Re-exports§
pub use encryption::EncryptionState;pub use encryption::EncryptionVersion;pub use encryption::Permissions;pub use encryption::aes256_encryption_state;
Modules§
Macros§
Structs§
- Bookmark
- Destination
- Dictionary
- Dictionary object.
- Document
- A PDF document.
- Font
Data - This struct represents the data of a font. It contains information about the font’s bounding box, ascent, descent, cap height, italic angle, and stemV. Reference: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.5_v6.pdf
- Incremental
Document - Load
Options - Options that control how a PDF document is loaded into memory.
- Object
Stream - Object
Stream Builder - Object
Stream Config - PdfMetadata
- PDF metadata extracted without loading the entire document. This is useful for quickly getting basic information about large PDFs.
- Reader
- Save
Options - Options for saving PDF documents
- Save
Options Builder - Builder for SaveOptions
- Stream
- Stream object Warning - all streams must be indirect objects, while the stream dictionary may be a direct object
- Toc
Enums§
- Encoding
- Error
- Object
- Basic PDF object types defined in an enum.
- Outline
- String
Format - String objects can be written in two formats.
Constants§
- DEFAULT_
MAX_ FILE_ BYTES - Default maximum input size: 256 MiB.
Functions§
- decode_
text_ string - Decodes a text string. Depending on the BOM at the start of the string, a different encoding is chosen. All encodings specified in PDF2.0 are supported (PDFDocEncoding, UTF-16BE, and UTF-8).
- encode_
utf8 - Encodes the given
strto UTF-8. This method of encoding text strings is first specified in PDF2.0 and reader support is still lacking (notably, Adobe Acrobat Reader doesn’t support it at the time of writing). Thus, using it is NOT RECOMMENDED. - encode_
utf16_ be - Encodes the given
strto UTF-16BE. The recommended way to encode text strings, as it supports all of unicode and all major PDF readers support it. - substr
- substring
- text_
string - Creates a text string. If the input only contains ASCII characters, the string is encoded in PDFDocEncoding, otherwise in UTF-16BE.