Skip to main content

pdf_toolkit/
lib.rs

1//! One crate for the whole toolkit. Each module is one of the layered crates,
2//! re-exported behind a feature so a reader-only build stays small and no_std.
3//!
4//! ```no_run
5//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
6//! let bytes = std::fs::read("book.pdf")?;
7//! let source = pdf_toolkit::core::PdfSource::new(bytes)?;
8//! let text = pdf_toolkit::text::extract::extract_text(source, pdf_toolkit::core::Limits::default())?;
9//! println!("{}", text.text);
10//! # Ok(())
11//! # }
12//! ```
13#![no_std]
14
15/// Objects, xref, filters, page tree and named limits (`pdf-toolkit-core`).
16pub use pdf_core as core;
17
18/// Fonts, text extraction, reading order, semantic documents, images (`pdf-toolkit-text`).
19#[cfg(feature = "text")]
20pub use pdf_text as text;
21
22/// Page display lists and glyph outlines (`pdf-toolkit-render`).
23#[cfg(feature = "render")]
24pub use pdf_render as render;
25
26/// Rasterizing pages to RGBA and PNG (`pdf-toolkit-raster`).
27#[cfg(feature = "raster")]
28pub use pdf_raster as raster;
29
30/// The deterministic document writer (`pdf-toolkit-write`).
31#[cfg(feature = "write")]
32pub use pdf_write as write;
33
34/// Incremental updates that keep the original bytes (`pdf-toolkit-edit`).
35#[cfg(feature = "edit")]
36pub use pdf_edit as edit;