Show HN: Presse – a Rust CLI tool to compress and merge PDFs
PDF processing CLI tool. Compress and merge PDF directly in your terminal. Convert images to pdf. Better compression and 7x faster than ghostscript. - SimonBure/presse
Summary not yet generated for this article.
Original Text
Compression, merging and image conversion to PDF in one command-line tool.
Benchmarked against ghostscript on the same corpus (~20 docs), compression was 7x faster, and 19% better compression (ghostscript even inflated some already-optimized docs).
The compression route extracts images, then lossy-compress them. This yield most of the gains compared to bytes optimization and artifact collection.
Presse uses lopdf and image crates. Understanding and handling multiple image color-spaces was the most confusing part for me, starting from almost zero knowledge about Rust (learning project!).
CMYK images not yet supported, some malformed PDF don't get properly compressed as well.
Comments (0 of ) ⌛