Skip to main content

Crate printpdf

Crate printpdf 

Source
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 ops::*;
pub use color::*;
pub use xobject::*;
pub use image_types::*;
pub use svg::*;
pub use image::*;
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
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
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
serialize
Core utils for writing PDF
shape
Text shaping, to position text manually Text shaping and measurement
svg
SVG handling
text
Text encoding and decoding functions
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§

ExtendedGraphicsStateId
Internal ID for extended graphic states
ExtendedGraphicsStateMap
FontId
Internal ID for Fonts
GeneratePdfOptions
IccProfileId
Internal ID for ICC profiles
LayerInternalId
Internal ID for Layers
PageAnnotId
Internal ID for page annotations
PageAnnotMap
PdfDocument
Parsed PDF document
PdfDocumentInfo
PdfFontMap
PdfLayerMap
PdfMetadata
This is a wrapper in order to keep shared data between the documents XMP metadata and the “Info” dictionary in sync
PdfResources
PdfToSvgOptions
XObjectId
Internal ID for XObjects
XObjectMap
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§

Base64OrRaw
Base64 is necessary because there are a lot of JS issues surrounding ArrayBuffer / Uint8Buffer / ByteArray type mismatches, so a simple atob / btoa fixes that at the cost of slight performance decrease.

Functions§

render_to_svg
render_to_svg_async