Dev Tools · 1h ago
Rust PDF-to-JPG converter clamps megapixels to avoid OOM crashes
A developer building a 600 DPI PDF-to-JPG converter in Rust with libvips found that large-format PDFs could produce multi-gigabyte images, crashing servers. They implemented a megapixel clamp that adaptively reduces resolution while preserving the requested DPI for normal pages. The fix, now running on Convertify, prevents memory exhaustion without silently downgrading all conversions.
Meridian48 take
This is a practical engineering solution to a common scaling problem, but the real takeaway is that naive DPI settings can be a footgun in production.
Read the full reporting
Building a 600-DPI PDF to JPG converter in Rust: the megapixel clamp that saved production →
DEV Community
pdf-conversionrust