| Crates.io | pdf-rs |
| lib.rs | pdf-rs |
| version | 0.1.7-dev |
| created_at | 2025-12-14 08:49:59.572027+00 |
| updated_at | 2026-01-14 14:17:02.993995+00 |
| description | A PDF parsing library written in Rust |
| homepage | https://github.com/LeoPlus1024/pdf-rs |
| repository | https://github.com/LeoPlus1024/pdf-rs |
| max_upload_size | |
| id | 1984034 |
| size | 158,316 |
⚠️ Warning: This project is currently under active development. APIs may change frequently and are not yet stable.
A PDF parsing library written in Rust.
pdf-rs is a Rust library for parsing PDF files. The project aims to provide parsing functionality for PDF document structures, including:
Sequence trait for efficient streaming file readingAdd this to your Cargo.toml:
[dependencies]
pdf-rs = "0.1"
use std::path::PathBuf;
use pdf_rs::document::PDFDocument;
// Create PDF document parser
let path = PathBuf::from("example.pdf");
let document = PDFDocument::open(path)?;
// Access PDF version
println!("PDF Version: {}", document.get_version());
// Get cross-reference table
let xrefs = document.get_xref();
println!("XRef entries: {}", xrefs.len());
For detailed API documentation, please refer to the crate documentation.
document: Main PDF document parsing functionalityobjects: PDF object representations (dictionaries, arrays, strings, etc.)parser: Core parsing logic for PDF objectssequence: Streaming file reading utilitiestokenizer: Tokenization of PDF contenterror: Error types and handlingThe project is in early development stage. Basic PDF parsing functionality has been implemented, including version detection, xref table parsing, and basic object parsing.
cargo build
cargo test
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (git checkout -b feature/AmazingFeature)
Commit your changes (git commit -m 'Add some AmazingFeature')
Push to the branch (git push origin feature/AmazingFeature)
Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.