Expand description
printpdf PDF library, second API iteration version
Re-exports§
pub use annotation::*;pub use cmap::*;pub use text::*;pub use wasm::*;pub use conformance::*;pub use matrix::*;pub use units::*;pub use date::*;pub use font::*;pub use shape::*;pub use graphics::*;pub use shading::*;pub use ops::*;pub use color::*;pub use xobject::*;pub use image_types::*;pub use svg::*;pub use image::*;pub use optimize::*;pub use html::*;pub use components::*;pub use serialize::*;pub use deserialize::*;
Modules§
- annotation
- Bookmarks, page and link annotation handling
- cmap
- /ToUnicode map serialization / parsing
- color
- Color handling
- components
- HTML component definitions printpdf’s custom XML/HTML components for the data-driven azul component system.
- conformance
- PDF conformance / PDF standards handling and validation
- date
- Date parsing and serializiation
- deserialize
- Core utils for parsing PDF deserialize.rs
- font
- Font and codepoint handling
- forms
- Interactive forms (AcroForm): read the fields, fill / flatten them, stamp drawings (signatures) onto pages - on the PDF’s own bytes Interactive forms (AcroForm): read a PDF’s fields - their kind, fully qualified name, value, options and where their widgets sit - and FILL them: the values written into the fields (with a fresh appearance, so every viewer shows them), or FLATTENED into the pages (drawn as page content, the fields removed: “the rendered PDF with the values”), with STAMPS (vector drawings - a signature) drawn onto pages.
- graphics
- Point / line / polygon handling
- html
- HTML handling (using azul solver3 and DisplayList) HTML to PDF converter using azul’s layout engine
- image
- Image decoding (requires ‘images’ feature)
- image_
types - Image types (always available)
- matrix
- Transformation and text matrices
- ops
- Page operations
- optimize
- Shrinking a finished PDF: its pictures (requires ‘images’ feature) and its /ActualText
Shrinking a finished PDF without changing what it shows or what its text reads as: its
pictures encoded again (
optimize_images), and the/ActualTextits glyphs read as anyway dropped (optimize_text). - serialize
- Core utils for writing PDF
- shading
- Axial / radial shadings (gradients) PDF axial / radial shadings (CSS linear / radial gradients).
- shape
- Text shaping, to position text manually Text shaping and measurement
- svg
- SVG handling
- text
- Text encoding and decoding functions
- text_
boxes - hOCR-style text geometry extraction: every text run of a page as line / word / glyph boxes with the decoded text attached.
- text_
shaping - Public API for text shaping using azul text3
- units
- Typed PDF units (Pt, Mm, Px, etc.)
- utils
- Utility functions (random strings, numbers, timestamp formatting)
- wasm
- WASM API functions
- xobject
- XObject handling
Structs§
- Extended
Graphics State Id - Internal ID for extended graphic states
- Extended
Graphics State Map - FontId
- Internal ID for Fonts
- Generate
PdfOptions - IccProfile
Id - Internal ID for ICC profiles
- Layer
Internal Id - Internal ID for Layers
- Page
Annot Id - Internal ID for page annotations
- Page
Annot Map - PdfDocument
- Parsed PDF document
- PdfDocument
Info - PdfFont
Map - PdfLayer
Map - PdfMetadata
- This is a wrapper in order to keep shared data between the documents XMP metadata and the “Info” dictionary in sync
- PdfResources
- PdfTo
SvgOptions - Shading
Map - XObject
Id - Internal ID for XObjects
- XObject
Map - XmpMetadata
- Initial struct for Xmp metatdata. This should be expanded later for XML handling, etc. Right now it just fills out the necessary fields
Enums§
- Base64
OrRaw - Base64 is necessary because there are a lot of JS issues surrounding
ArrayBuffer/Uint8Buffer/ByteArraytype mismatches, so a simpleatob/btoafixes that at the cost of slight performance decrease.