1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! PDF creation library for Rust.
//!
//! `pivot-pdf` provides a high-level API for building PDF documents
//! programmatically. It is designed for low memory usage, making it suitable
//! for SaaS applications that generate many documents (invoices, reports,
//! contracts, bills of material, etc.).
//!
//! # Quick Start
//!
//! ```no_run
//! use pivot_pdf::{PdfDocument, BuiltinFont, Rect, TextFlow, TextStyle};
//!
//! let mut doc = PdfDocument::new(Vec::<u8>::new()).unwrap();
//! doc.set_info("Title", "Hello World");
//! doc.begin_page(612.0, 792.0);
//! doc.place_text("Hello, world!", 72.0, 720.0);
//! doc.end_page().unwrap();
//! let pdf_bytes = doc.end_document().unwrap();
//! ```
//!
//! # Key Types
//!
//! - [`PdfDocument`] — the main entry point for building documents
//! - [`TextFlow`] — flowing styled text across multiple pages
//! - [`Table`] — rendering tabular data with flexible styling
//! - [`BuiltinFont`] — the 14 standard PDF fonts (no embedding required)
//!
//! # Feature Highlights
//!
//! - **Incremental page writing**: each page is flushed to the writer as it
//! completes, keeping memory constant regardless of document size.
//! - **TrueType fonts**: embed custom fonts from `.ttf` files.
//! - **JPEG and PNG images**: embed with automatic fit/fill/stretch modes.
//! - **FlateDecode compression**: enable with [`PdfDocument::set_compression`].
//! - **PDF merge**: combine existing PDFs with [`merge_pdfs`].
/// High-level PDF document builder.
/// Font types and metrics.
/// Color types for PDF graphics.
/// Image loading and placement.
/// PDF merge operations.
/// PDF object types (ISO 32000-1:2008 §7.3).
/// PDF reader for parsing existing PDF files.
/// Table rendering for tabular data.
/// Flowing text layout across bounding boxes.
/// TrueType font parsing and embedding.
/// Low-level PDF binary writer.
pub use PdfDocument;
pub use ;
pub use Color;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;