Free plan
Compress PDF
Make a PDF smaller so it is easy to send or upload
About this tool
This tool reduces the file size of a PDF, mostly by shrinking its pictures, and can also repair a damaged PDF. You choose a method. One lowers picture quality or resolution, for example for screen reading or for printing, and can turn colours to grey. Another can aim for a target size. Text is never made worse.
For example, your 40 MB scanned report is too big for e-mail, so you shrink it to a few MB.
How to use it
- Choose this tool.
- Add your PDF.
- Choose how to shrink it: for example, a ready-made level such as screen or ebook, or a size you would like to reach.
- Set optional choices such as picture quality, grey colours, or repairing a broken file.
- Press Generate, then download the smaller PDF.
What you get back
You get a new, usually smaller PDF, and you can download it. If the file is already well compressed, it may not shrink much.
GOOD TO KNOW
recompressImages combined with engine=qpdf -> 400 invalid_parameter.
TEST IT LIVE
Try Compress PDF in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/optimize
Tool ID
pdfs.optimize
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/optimize" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'imageQuality=75' \
-F 'imageColorSpace=srgb' \
-F 'profile=screen'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.optimize({
"file": 'document.pdf',
"imageQuality": 75,
"imageColorSpace": "srgb",
"profile": "screen"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->optimize([
'file' => 'document.pdf',
'imageQuality' => 75,
'imageColorSpace' => 'srgb',
'profile' => 'screen',
]);
echo $result->requestId;Documentation
Guides that use this tool
More in PDFs
