lopdf vs pdfium in Rust — Why I Chose the Smaller One

TL;DR AI
2 min readKey summary
A Rust PDF app builder compared lopdf and pdfium-render and chose lopdf.
The main reason was lopdf’s small binary size and direct access to PDF objects and structure.
The tradeoff is weaker rendering and some compatibility limits, which were handled by using macOS PDFKit for display.
The comparison highlights the difference between a low-level editing library and a rendering-focused PDF binding.

