Overview
Some organizations cannot send documents to any third-party server, even for automated processing. This is common when working with sensitive files, regulated data, internal legal documents, medical records, financial records, or customer documents covered by strict data-handling policies.
PDF.co is designed for cloud-based API workflows. If your organization allows cloud processing, PDF.co can handle PDF conversion, compression, parsing, editing, and automation through managed APIs.
If your organization requires that files never leave your own servers, Ghostscript may be a better fit. Ghostscript can be installed and run inside your own infrastructure, allowing your team to process PDFs without uploading files to PDF.co or another cloud service.
Recommended Option: Ghostscript
Ghostscript is a self-hosted PDF and PostScript processing engine. It can be used from the command line or integrated into internal server-side workflows.
With Ghostscript, your team controls the full processing path:
Where source files are stored
Where temporary files are created
Where output files are saved
Who can access the processing environment
How PDF processing is logged, monitored, and secured
This makes Ghostscript useful for teams that need PDF compression, conversion, or optimization while keeping documents entirely within their own network or private server environment.
When Should I Use Ghostscript Instead of PDF.co?
Consider Ghostscript if:
Your security policy does not allow files to be uploaded to third-party services.
Your documents must stay on-premise or inside a private cloud account you control.
Your compliance team requires the entire document workflow to run in-house.
You only need local PDF compression, conversion, or optimization.
Your technical team can install, maintain, and secure document-processing software.
Continue using PDF.co if:
Your organization allows cloud-based document processing.
You want managed APIs instead of maintaining your own PDF processing tools.
You need PDF.co features such as templates, integrations, parsing, editing, or automation.
You prefer not to manage local infrastructure for PDF processing.
What Can Ghostscript Do?
Ghostscript can help with common PDF processing tasks such as:
Compressing PDF files
Optimizing PDF output
Converting PostScript files to PDF
Creating image outputs from PDF pages
Running PDF workflows from scripts or internal applications
You can learn more here:
Example: Compress a PDF on Your Own Server
After installing Ghostscript on your server, you can compress a PDF with a command like this:
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/ebook \
-dNOPAUSE \
-dQUIET \
-dBATCH \
-sOutputFile=compressed.pdf \
input.pdf
On Windows, use the Ghostscript console executable, for example:
gswin64c.exe -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed.pdf input.pdf
Common PDFSETTINGS values include:
/screen- smaller file size, lower image quality/ebook- balanced file size and quality/printer- higher quality, usually larger files/prepress- high-quality output for print workflows
Always test the output quality and file size with your own documents before using a setting in production.
Important Notes
Ghostscript is maintained by Artifex and is separate from PDF.co.
Review Ghostscript licensing before production use. Ghostscript is available under AGPL and commercial licensing options.
Your team is responsible for installing, securing, updating, and operating Ghostscript in your own environment.
Summary
If your files can be processed in the cloud, PDF.co provides managed APIs for PDF automation.
If your files must never touch a third-party server, Ghostscript provides a self-hosted alternative for PDF compression and conversion. This allows your organization to move PDF processing in-house and keep the entire workflow under your own control.