
Maximize PDF Performance with Reduced File Size
Make Every PDF Faster to Move, Store, and Deliver
Oversized PDFs slow down the experiences people notice: a customer waiting for a download, a portal loading a report, a team sending an attachment, or a repository absorbing thousands of files. High-resolution images, duplicate resources, unused fonts, embedded application data, and inefficient streams can add substantial weight without adding value to the document's next use.
The pdfRest Compress PDF API Tool gives applications one API capability for making PDFs smaller at scale. Adobe PDF optimization technology reduces redundant document data, optimizes images and streams, and removes unused resources so the workflow receives a smaller PDF ready for storage, delivery, or the next processing step.
The impact is measurable. Current pdfRest testing shows average file-size reductions of 53% with low compression and 68% with high compression, with reductions up to 98% for image-heavy PDFs. During product development, pdfRest also benchmarked the medium preset against SDKs, desktop applications, and online PDF services using a diverse collection of PDFs. In that testing, medium compression achieved 20% greater compression efficiency than the compared offerings, and individual files exceeded 90% compression.
Those results make Compress PDF a practical way to improve document performance without adding a separate PDF optimization stack to the application. The result for any individual file still depends on its content and the selected settings, but the tool provides a strong, repeatable compression capability where it matters most.
Match Compression to the Job
The compression_level parameter offers low, medium, and high presets. Low favors fidelity while still removing avoidable data. Medium is built for general distribution and storage, while high prioritizes the smallest practical result for size-constrained channels. One endpoint therefore supports different business goals without requiring a separate integration for each one.
Applications with specialized requirements can set compression_level=custom and upload a JSON profile. Custom profiles provide granular control over how the optimization process handles images, fonts, user data, and other PDF objects. A document platform can maintain tailored policies for downloadable product manuals, customer statements, high-volume scan packages, and other recurring document classes.
Put Performance Decisions on Autopilot
The Query PDF API Tool returns file_size in bytes along with other document properties. That lets the application decide which PDFs benefit most from compression. A repository can compare each file against a storage, download, or delivery threshold and send qualifying documents directly to Compress PDF.
For example, a SaaS reporting platform can deliver small generated reports immediately, apply medium compression to larger reports, and use an image-focused custom profile for scan-heavy packages. Every successful pdfRest operation returns a resource ID, so a PDF created by Convert to PDF or Merge PDFs can move directly into compression without an extra upload.
This turns PDF performance into a managed workflow policy instead of a manual cleanup task. The application owns the threshold and document-class rule; pdfRest supplies the compression engine that executes it consistently across the documents customers actually need to access and share.
Apply Medium PDF Compression
The following current cURL example applies the medium preset and names the optimized output.
Apply Medium PDF Compression Code Example | Load this into API Lab↗
# By default, this request uses the US-based API service. API_URL="https://api.pdfrest.com" # For the EU-based service, use: # API_URL="https://eu-api.pdfrest.com" curl -X POST "$API_URL/compressed-pdf" \ -H "Accept: application/json" \ -H "Content-Type: multipart/form-data" \ -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ -F "file=@/path/to/report.pdf" \ -F "compression_level=medium" \ -F "output=optimized_report"
Use API Lab to compare presets or configure a custom profile. The Compress PDF and Query PDF references provide the current fields.
|
Compress PDF |