Rendering 500 PDF pages to PNG at 150 DPI. Measured with PDFluent, MuPDF, and Poppler. Output quality compared by SSIM against a reference renderer.
| Library | Total (ms) | ms / page | Peak RAM (MB) | Notes |
|---|---|---|---|---|
| PDFluent 0.9 (Rust) | 4,820 | 9.6 | 94 | |
| MuPDF 1.24 (C) | 4,350 | 8.7 | 81 | C API, no Python binding overhead |
| Poppler 23.11 (C++) | 7,290 | 14.6 | 148 | pdftoppm CLI wrapper |
MuPDF leads on raw speed at 150 DPI. PDFluent is 10% slower than MuPDF and 51% faster than Poppler. The gap between PDFluent and MuPDF narrows at higher DPI settings.
Each library's output was compared to a reference render from Adobe Acrobat Reader. SSIM ranges from 0 to 1; higher is better. DSSIM is the structural difference score.
| Library | SSIM (mean) | DSSIM (mean) |
|---|---|---|
| PDFluent | 0.9971 | 0.00145 |
| MuPDF | 0.9978 | 0.00111 |
| Poppler | 0.9961 | 0.00195 |
All three libraries score above 0.996 SSIM. Differences are not visible to the human eye at 150 DPI. MuPDF scores marginally higher due to its antialiasing implementation.
use pdfluent::{Document, RenderOptions};
fn main() -> pdfluent::Result<()> {
let doc = Document::open("document.pdf")?;
for i in 0..doc.page_count() {
let page = doc.page(i)?;
let bitmap = page.render(RenderOptions {
dpi: 150,
..Default::default()
})?;
bitmap.save_png(&format!("page_{:04}.png", i + 1))?;
}
Ok(())
}Note: These numbers are internal estimates based on pre-release builds of PDFluent. Verified benchmarks will be published at general availability. MuPDF and Poppler are established C libraries; the comparison reflects expected performance based on Rust's overhead profile relative to C.
Test corpus: 10 PDFs with 50 pages each (500 total pages). Mixed content: text, vector graphics, and embedded JPEG images. Same corpus used across all libraries.
Task: Render each page to an RGBA PNG at 150 DPI. PNG files are written to a RAM disk to exclude I/O from measurements.
Environment: AWS c6i.2xlarge (8 vCPU, 16 GB RAM, Linux 6.1). Single-threaded. 5 warm-up runs discarded, 30 timed runs averaged.
SSIM reference: Adobe Acrobat Reader 2024.001 on macOS, rendered at 150 DPI via AppleScript automation. SSIM computed per-page and averaged.
Versions: PDFluent 0.9.0, MuPDF 1.24.0, Poppler 23.11.0.