Compare
pdfboss vs pdfplumber.
pdfplumber builds on pdfminer.six in pure Python and gives you every character, rectangle and line on a page, plus a structured, highly configurable table extraction API. pdfboss is a PDF engine written from scratch in Rust. Both are permissively licensed, so the differences are speed, rendering, and what each API is for.
| pdfboss | pdfplumber | |
|---|---|---|
| License | MIT OR Apache-2.0 | MIT |
| Engine | Written from scratch in safe Rust; no C dependencies | Pure Python on pdfminer.six; imaging through Pillow and pypdfium2 |
| Text extraction | Layout analysis to plain text; 10,312 pages/s over 40 PDFs | Character-level extraction in pure Python, with tunable tolerances |
| Rendering to PNG, PPM, BMP or JPEG | 161.9 pages/s | 100.4 pages/s through pypdfium2 (38 certified files, 888 pages) |
| Scanned JBIG2 book | 65.2 pages/s | 51.7 pages/s (544 pages at 1:1) |
| Table extraction | Detected from layout and drawn borders, emitted as Markdown tables | extract_tables returns structured rows; strategies are highly configurable |
| PDF to Markdown | pdfboss md, from layout | Not provided |
| Low-level geometry | Styled spans: bbox, font, bold, italic, color, visibility | Chars, lines, rects and curves with full geometry per page |
| Async and remote | AsyncDocument over files and HTTP range requests | Synchronous API |
| Creating PDFs | Composable write API, Markdown to PDF with CSS themes | Not provided |
| Dependencies | abi3 wheels for CPython 3.12+, no native dependency | pdfminer.six, Pillow and pypdfium2 (Python 3.8+) |
Throughput rows come from the pdfboss benchmark harness, where pdfplumber renders through pypdfium2 and was measured in the same session as pdfboss. License and dependency statements come from each project’s PyPI metadata.
Migration
The reading path, side by side.
extract_text() on the document covers all pages with layout analysis already applied and spreads them across cores. render returns PNG bytes directly, and tables land in extract_markdown() as pipe tables rather than as structured rows.
import pdfplumber
with pdfplumber.open("report.pdf") as pdf:
text = "\n".join(page.extract_text() for page in pdf.pages)
image = pdf.pages[0].to_image(resolution=144)
image.save("page.png")
tables = pdf.pages[0].extract_tables()import pdfboss
doc = pdfboss.Document("report.pdf")
text = doc.extract_text()
png = doc[0].render(scale=2.0)
open("page.png", "wb").write(png)
markdown = doc.extract_markdown() # tables become pipe tablesWhere pdfplumber is ahead
What pdfplumber does that pdfboss does not.
- Table extraction as a first-class API: extract_tables returns rows as structured lists, and its line and text strategies are highly configurable, down to explicit cell borders. pdfboss detects tables only for its Markdown output.
- A per-object view of the page: every character, line, rectangle and curve with its geometry, plus cropping and filtering over them.
- Visual debugging: to_image draws the detected characters, rectangles, lines and tables over the page, which makes extraction tuning concrete.
Where pdfboss is ahead
What pdfboss does that pdfplumber does not.
- Speed on the measured render paths: 161.9 against 100.4 pages per second on the mixed corpus and 65.2 against 51.7 on the JBIG2 scan, with rendering built into the engine rather than delegated to pypdfium2.
- Compiled-Rust text extraction with layout analysis (columns, reading order, word spacing) that spreads pages across cores: 10,312 pages per second on the 40-file corpus.
- Markdown output with headings, lists and tables, and styled spans carrying font, weight, decorations and color.
- Async reading over HTTP range requests, so a page from a remote file arrives without downloading the file.
- PDF creation: a composable write API, Markdown to PDF with CSS themes, and deterministic output.
Questions
- Is pdfboss a drop-in replacement for pdfplumber?
- No. The APIs differ, and pdfplumber's structured table extraction and per-character object model have no pdfboss equivalent. The text and rendering calls migrate in a few lines; code built on extract_tables or on chars, rects and lines should stay on pdfplumber.
- Which one extracts tables better?
- pdfplumber. Its extract_tables method returns rows as structured lists and is highly configurable, down to explicit cell borders. pdfboss detects tables from column gaps and drawn borders for its Markdown output, scoring 0.494 on opendataloader-bench's table-structure metric, and offers no structured table API.
- Is pdfboss faster than pdfplumber?
- On rendering, where both were measured: 161.9 against 100.4 pages per second over 888 certified pages, and 65.2 against 51.7 on a 544-page JBIG2 scan. pdfplumber renders through pypdfium2, so those rows time PDFium plus the Python layer above it. For text, pdfboss measures 10,312 pages per second on its 40-file corpus from compiled Rust; pdfplumber parses in pure Python through pdfminer.six.
- Are both free for commercial use?
- Yes. pdfplumber is MIT licensed and pdfboss is MIT OR Apache-2.0. Neither carries copyleft obligations, so the choice is technical: pdfplumber's table and geometry detail on one side, pdfboss's speed, rendering and Markdown output on the other.