Expand description
§justpdf
Pure Rust PDF engine with a high-level API for reading, rendering, extracting text, creating, and modifying PDF documents.
§Quick Start
use justpdf::Document;
// Open and read
let doc = Document::open("input.pdf").unwrap();
println!("Pages: {}", doc.page_count());
// Extract text
let page = doc.page(0).unwrap();
println!("{}", page.text().unwrap());
// Render to PNG
let png = page.render_png(150.0).unwrap();
std::fs::write("page1.png", &png).unwrap();Re-exports§
pub use justpdf_core as core;pub use justpdf_render as render;
Structs§
- Document
- A high-level PDF document handle.
- Document
Builder - High-level builder for creating complete PDF documents.
- Document
Modifier - Modifier for existing PDF documents. Loads all objects from a PdfDocument, allows modification, then saves.
- Indirect
Ref - A reference to an indirect PDF object:
N M R. - Modifier
- Document modifier for editing existing PDFs.
- Page
- A single page of a PDF document.
- Page
Builder - Builder for constructing a single PDF page with content streams.
- Page
Iter - Iterator over document pages.
- PdfDict
- An ordered dictionary of PDF objects, keyed by name bytes.
- Render
Options
Enums§
- Error
- High-level error type for the justpdf crate.
- Just
PdfError - All errors that can occur in justpdf-core.
- Output
Format - Output format for rendering.
- PdfObject
- A PDF object value.
Functions§
- embed_
jpeg - Embed a JPEG image into the document.
- embed_
png - Embed a PNG image into the document.
- merge
- Merge multiple PDF files into one.
- merge_
bytes - Merge PDF documents from in-memory byte vectors.
- merge_
documents - Merge pages from multiple PDF documents into one.
Type Aliases§
- Result
- A specialized
Resulttype for justpdf operations.