Reduce PDF file size by up to 90% while preserving visual quality, using an industry-grade Ghostscript-tiered compression engine. Choose basic, medium, or maximum compression to balance size and quality. Perfect for email attachments, web uploads, document archiving, and storage optimization. Upload a PDF and receive a downloadable compressed file with before/after size metrics. Fast, reliable, and production-ready for any document workflow.
{"success":true,"url":"https://pub-6db99bab215e44889f46c4b2a619f8c5.r2.dev/compressed/20260619/bb30c136-f449-4428-8aee-73a1765cde47.pdf","original_size":2526695,"compressed_size":2317882,"compression_ratio":0.9173572591864075,"space_saved_percent":8.264274081359247,"quality_score":0.95,"processing_time":"7149ms"}
curl --location 'https://zylalabs.com/api/12963/pdf+compression+and+optimizer+api/25880/compress+pdf?level=basic&preserve_quality=basic' \
--header 'Content-Type: application/json' \
--form 'image=@"FILE_PATH"'
Após se cadastrar, cada desenvolvedor recebe uma chave de acesso à API pessoal, uma combinação única de letras e dígitos para acessar nosso endpoint de API. Para autenticar com a PDF Compression and Optimizer API basta incluir seu token Bearer no cabeçalho Authorization.
| Cabeçalho | Descrição |
|---|---|
Authorization
|
Obrigatório
Deve ser Bearer access_key. Veja "Sua chave de acesso à API" acima quando você estiver inscrito.
|
Sem compromisso de longo prazo. Faça upgrade, downgrade ou cancele a qualquer momento. O teste gratuito inclui até 50 requisições.
(Economize 2 meses com cobrança anual 🎉)
Empresas líderes confiam em nós
The PDF Compression and Optimizer API reduces the file size of PDF documents while maintaining readability and visual appearance. The API accepts a PDF file as input, applies compression and optimization techniques, and returns a downloadable version of the compressed document along with file size statistics.
Users can select different compression levels to balance file size reduction and document quality. Available compression modes include basic, medium, and maximum, allowing developers to choose the most suitable option for their use case. The API can also preserve visual quality during compression to help maintain the appearance of text, images, graphics, and document layouts.
The API is designed for workflows that require smaller PDF files for storage, sharing, uploading, or distribution. Compressed files can reduce storage requirements, improve transfer speeds, decrease bandwidth usage, and help meet file size restrictions imposed by email systems, document portals, and cloud platforms.
Common use cases include:
Reducing PDF size for email attachments
Optimizing files before uploading to websites
Preparing documents for cloud storage
Compressing reports, invoices, and contracts
Reducing storage requirements for archived documents
Optimizing scanned PDF files
Processing large volumes of PDF documents
Automating document management workflows
Preparing files for document sharing platforms
Reducing bandwidth usage during file transfers
Features:
PDF file compression and optimization
Multiple compression levels
Basic, medium, and maximum compression modes
Optional visual quality preservation
File size reduction reporting
Original and compressed file size metrics
Compression ratio information
Downloadable compressed PDF output
JSON response format
HTTPS-based API access
The API returns structured JSON responses containing a download URL for the compressed file, along with information such as original file size, compressed file size, compression ratio, and processing details. It can be integrated into document management systems, cloud storage platforms, workflow automation tools, business applications, web services, and other systems that process PDF documents.
O endpoint Comprimir PDF retorna um objeto JSON contendo uma URL para download do PDF comprimido, juntamente com métricas como tamanho original do arquivo, tamanho do arquivo comprimido, taxa de compressão, porcentagem de espaço economizado, pontuação de qualidade e tempo de processamento
Key fields in the response include "success" (boolean), "url" (string), "original_size" (integer), "compressed_size" (integer), "compression_ratio" (float), "space_saved_percent" (float), "quality_score" (float), and "processing_time" (string).
Users can customize their requests by providing the PDF file in the file field and selecting a compression level, which can be basic, medium, or maximum, to balance file size and quality.
The response data is structured in a JSON format, with a top-level object containing fields for success status, download URL, size metrics, and processing details, making it easy to parse and utilize programmatically.
The endpoint provides information on the original and compressed file sizes, the compression ratio, the percentage of space saved, the quality score of the compressed file, and the time taken for processing.
Os usuários podem usar a URL retornada para baixar o PDF compactado analisar as métricas de tamanho para avaliar a eficácia da compressão e monitorar a pontuação de qualidade para garantir que a integridade visual do documento seja mantida
Casos de uso típicos incluem reduzir o tamanho de PDFs para anexos de e-mail otimizar arquivos para upload na web preparar documentos para armazenamento em nuvem e comprimir grandes volumes de PDFs para uma gestão eficiente de documentos
Data accuracy is maintained through the use of an industry-grade Ghostscript-tiered compression engine, which applies advanced optimization techniques while preserving the visual quality of text, images, and layouts in the PDF.