A PDF creation library written in Rust, designed for SaaS and web applications. Low memory and CPU consumption — even for documents with hundreds of pages.
A PDF creation library written in Rust, designed to be used from any language. The core is implemented in Rust and can be used directly in Rust projects. Language bindings are being built for PHP, Python, Go, C#, and other major languages.
Designed for low memory and CPU consumption — even for documents with hundreds of pages — making it well suited for SaaS and web applications that generate reports, contracts, invoices, or bills of material on the fly.
| Feature | Status |
|---|---|
| Text placement | ✅ |
| TextFlow — word wrap and multi-page reflow | ✅ |
| Word-break control — force-break, hyphenate, or overflow | ✅ |
| 14 built-in PDF fonts | ✅ |
| TrueType font embedding | ✅ |
| Line graphics (paths, rectangles, stroke, fill) | ✅ |
| JPEG and PNG images | ✅ |
| Streaming tables with per-cell styles | ✅ |
| Coordinate origin — bottom-left or top-left; transparent conversion | ✅ |
| Form fields — fillable AcroForm text fields | ✅ |
| Page editing (post-write overlay, page numbering) | ✅ |
| FlateDecode compression (50–80% size reduction) | ✅ |
| PDF reading — inspect page count and version | ✅ |
| PDF merging — combine multiple PDFs into one | ✅ |
| PHP extension | ✅ |
.ttf files with full Unicode supportuse pdf_core::{BuiltinFont, FontRef, PdfDocument, TextFlow, TextStyle, Rect};
let mut doc = PdfDocument::create("output.pdf")?;
doc.set_info("Title", "My Document");
let font = doc.load_builtin_font(BuiltinFont::Helvetica)?;
let style = TextStyle::new(FontRef::Builtin(font), 12.0);
let mut tf = TextFlow::new();
tf.add_text("Hello, Pivot PDF!", &style);
doc.begin_page(612.0, 792.0);
doc.fit_textflow(&mut tf, Rect::new(72.0, 72.0, 468.0, 680.0))?;
doc.end_page()?;
doc.end_document()?;
| Language | Status |
|---|---|
| Rust | ✅ Available |
| PHP (Linux, macOS) | ✅ Available |
| PHP (Windows) | 🔲 Planned |
| CLI | 🔲 Planned |
| Python | 🔲 Planned |
| Go | 🔲 Planned |
| C# | 🔲 Planned |