Expand description
User-friendly PDF generator written in pure Rust.
genpdfi is a high-level PDF generator built ontop of [printpdf][] and [rusttype][]. It
takes care of the page layout and text alignment and renders a document tree into a PDF
document. All of its dependencies are written in Rust, so you don’t need any pre-installed
libraries or tools.
Modules§
- elements
- Elements of a PDF document.
- error
- Error types for
genpdfi. - fonts
- Fonts, font families and a font cache.
- render
- Low-level PDF rendering utilities.
- style
- Types for styled strings.
- subsetting
- Font subsetting module using the subsetter crate.
- wrap 🔒
- Utilities for text wrapping.
Structs§
- Context
- The context for a rendering process.
- Document
- A PDF document.
- Margins
- The margins of an area, measured in millimeters.
- Mm
- A length measured in millimeters.
- Position
- A position on a PDF layer, measured in millimeters.
- Render
Result - The result of the rendering process.
- Rotation
- A rotation in degrees clock-wise in range [-180.0, 180.0] inclusive.
- Scale
- A size to stretch an image on a PDF layer; measured in percentage.
- Simple
Page Decorator - Prepares a page of a document with margins and a header.
- Size
- A size of an area on a PDF layer, measured in millimeters.
Enums§
- Alignment
- The alignment of a
Paragraphor [‘Image’][]. - Paper
Size - A paper size like A4, legal or letter.
Traits§
- Element
- An element of a PDF document.
- Page
Decorator - Prepares a page of a document.