{"id":50418777,"url":"https://github.com/developer0hye/pdfplumber-rs","last_synced_at":"2026-05-31T07:05:05.499Z","repository":{"id":341014542,"uuid":"1168385581","full_name":"developer0hye/pdfplumber-rs","owner":"developer0hye","description":"pdfplumber-rs is a Rust port of Python's pdfplumber. It extracts structured content from PDF files with coordinate-accurate positioning, including characters, words, lines, rectangles, curves, images, and tables.","archived":false,"fork":false,"pushed_at":"2026-03-03T23:57:12.000Z","size":29979,"stargazers_count":1,"open_issues_count":29,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T17:34:34.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developer0hye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-27T10:24:46.000Z","updated_at":"2026-03-03T23:57:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/developer0hye/pdfplumber-rs","commit_stats":null,"previous_names":["developer0hye/pdfplumber-rs"],"tags_count":0,"template":false,"template_full_name":"developer0hye/claude-code-template","purl":"pkg:github/developer0hye/pdfplumber-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer0hye%2Fpdfplumber-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer0hye%2Fpdfplumber-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer0hye%2Fpdfplumber-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer0hye%2Fpdfplumber-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developer0hye","download_url":"https://codeload.github.com/developer0hye/pdfplumber-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer0hye%2Fpdfplumber-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33722190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T07:05:04.930Z","updated_at":"2026-05-31T07:05:05.492Z","avatar_url":"https://github.com/developer0hye.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pdfplumber-rs\n\n[![CI](https://github.com/developer0hye/pdfplumber-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/developer0hye/pdfplumber-rs/actions/workflows/ci.yml)\n[![crates.io](https://img.shields.io/crates/v/pdfplumber.svg)](https://crates.io/crates/pdfplumber)\n[![docs.rs](https://docs.rs/pdfplumber/badge.svg)](https://docs.rs/pdfplumber)\n[![MSRV](https://img.shields.io/badge/MSRV-1.85-blue.svg)](https://github.com/developer0hye/pdfplumber-rs)\n[![License](https://img.shields.io/crates/l/pdfplumber.svg)](https://github.com/developer0hye/pdfplumber-rs/blob/main/LICENSE)\n\nExtract chars, words, lines, rects, and tables from PDF documents with precise coordinates.\n\n**pdfplumber-rs** is a Rust port of Python's [pdfplumber](https://github.com/jsvine/pdfplumber). It extracts structured content from PDF files with coordinate-accurate positioning, including characters, words, lines, rectangles, curves, images, and tables.\n\n## Features\n\n- **Text extraction** with spatial grouping into words, lines, and text blocks\n- **Table detection** using lattice (line-based), stream (text-alignment), and explicit strategies\n- **Spatial filtering** via `crop`, `within_bbox`, and `outside_bbox`\n- **CJK support** including CID fonts, Identity-H/V CMaps, and CJK-aware word grouping\n- **Page-level streaming** for memory-efficient processing of large documents\n- **WASM support** via `wasm32-unknown-unknown` target\n- **Optional serde** serialization for all data types\n- **Optional parallel** processing via rayon\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\npdfplumber = \"0.1\"\n```\n\n### Feature Flags\n\n| Feature    | Default | Description                                                    |\n|------------|---------|----------------------------------------------------------------|\n| `std`      | Yes     | Enables file-path APIs (`Pdf::open_file`). Disable for WASM.  |\n| `serde`    | No      | Adds `Serialize`/`Deserialize` to all public data types.       |\n| `parallel` | No      | Enables `Pdf::pages_parallel()` via rayon. Not WASM-compatible.|\n\n## Quick Start\n\n### Extract Text\n\n```rust,no_run\nuse pdfplumber::{Pdf, TextOptions};\n\nfn main() {\n    let pdf = Pdf::open_file(\"document.pdf\", None).unwrap();\n    for page_result in pdf.pages_iter() {\n        let page = page_result.unwrap();\n        let text = page.extract_text(\u0026TextOptions::default());\n        println!(\"Page {}: {}\", page.page_number(), text);\n    }\n}\n```\n\n### Extract Tables\n\n```rust,no_run\nuse pdfplumber::{Pdf, TableSettings};\n\nfn main() {\n    let pdf = Pdf::open_file(\"document.pdf\", None).unwrap();\n    let page = pdf.page(0).unwrap();\n    let tables = page.find_tables(\u0026TableSettings::default());\n    for table in \u0026tables {\n        for row in \u0026table.rows {\n            let cells: Vec\u003c\u0026str\u003e = row.iter()\n                .map(|c| c.text.as_deref().unwrap_or(\"\"))\n                .collect();\n            println!(\"{:?}\", cells);\n        }\n    }\n}\n```\n\n### Extract Characters\n\n```rust,no_run\nuse pdfplumber::Pdf;\n\nfn main() {\n    let pdf = Pdf::open_file(\"document.pdf\", None).unwrap();\n    let page = pdf.page(0).unwrap();\n    for ch in page.chars() {\n        println!(\n            \"'{}' at ({:.1}, {:.1}) font={} size={:.1}\",\n            ch.text, ch.bbox.x0, ch.bbox.top, ch.fontname, ch.size\n        );\n    }\n}\n```\n\n## WASM Support\n\nFor `wasm32-unknown-unknown` targets, disable the default `std` feature:\n\n```toml\n[dependencies]\npdfplumber = { version = \"0.1\", default-features = false }\n```\n\nUse the bytes-based API:\n\n```rust,ignore\nlet pdf = Pdf::open(pdf_bytes, None)?;\nlet page = pdf.page(0)?;\nlet text = page.extract_text(\u0026TextOptions::default());\n```\n\n## Architecture\n\n```text\n+--------------------------------------------------------------+\n|  Layer 5: Table Detection (Lattice / Stream / Explicit)      |\n+--------------------------------------------------------------+\n|  Layer 4: Text Grouping \u0026 Reading Order                      |\n|  Characters -\u003e Words -\u003e Lines -\u003e TextBlocks                  |\n+--------------------------------------------------------------+\n|  Layer 3: Object Extraction                                  |\n|  Chars (bbox/font/size/color), Paths (lines/rects/curves)    |\n+--------------------------------------------------------------+\n|  Layer 2: Content Stream Interpreter                         |\n|  Text state, Graphics state, CTM, XObject Do                 |\n+--------------------------------------------------------------+\n|  Layer 1: PDF Parsing (pluggable backend via PdfBackend)     |\n|  lopdf (default)                                             |\n+--------------------------------------------------------------+\n```\n\nThe library is split into three crates:\n\n| Crate              | Description                                      |\n|---------------------|--------------------------------------------------|\n| `pdfplumber-core`   | Backend-independent data types and algorithms    |\n| `pdfplumber-parse`  | PDF parsing and content stream interpretation    |\n| `pdfplumber`        | Public API facade (this is what you depend on)   |\n\n## Minimum Supported Rust Version\n\nRust 1.85 or later.\n\n## License\n\nLicensed under either of:\n\n- [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n- [MIT License](http://opensource.org/licenses/MIT)\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper0hye%2Fpdfplumber-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper0hye%2Fpdfplumber-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper0hye%2Fpdfplumber-rs/lists"}