byADIT Free software for engineers and students
EngiFree
Ghostscript — The Complete Guide: Compression, PDF/A and Rendering to Images from the Command Line

Ghostscript — The Complete Guide: Compression, PDF/A and Rendering to Images from the Command Line

Ghostscript is a PostScript and PDF interpreter that many programs use behind the scenes — including some virtual PDF printers on Windows. Run it directly from the command line and you get a powerful tool for compressing, converting and repairing files, on Windows, macOS and Linux.

What you get

Usage examples

Compress: gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -o small.pdf plans.pdf. Render to images: gs -sDEVICE=png16m -r150 -o page-%03d.png plans.pdf. There are many parameters, so the documentation is worth reading. The licence is AGPL-3.0: free for any use, commercial included, but embedding it in closed-source software or in a service that does not release its source needs a commercial licence from Artifex.

Related tools

For structural repair and decryption — qpdf. For OCR on scans, which also relies on Ghostscript — OCRmyPDF. For compression in a GUI — PDF24.

The bottom line

Ghostscript is the professional engine for PDF processing. The learning curve is steep, but one saved command saves hours.

Further reading

מדריכי AI למהנדסים ולמשרד, ב-5 שפות: adit-ai.com ←