Hyper-Compress
Mixed raster content (MRC) is a way to compress images with mixed content. For more information, see the MRC Wikipedia article.
Document Engine uses advanced MRC compression techniques to reduce the size of structured documents that mix text, graphics, and images, without losing quality.
Our MRC compression engine is based on MRC hyper-compression techniques, and it can both reduce the size of images and improve rendering quality. Using image segmentation, it compresses areas with the optimum algorithm based on their characteristics.
For more information on hyper-compression, check out our demo video below.
Using MRC Compression
To hyper-compress a PDF using MRC compression, use the mrcCompression
parameter from the optimize
operation when downloading a document as a PDF:
curl -X POST http://localhost:5000/api/build \ -H "Authorization: Token token=<API token>" \ -F document=@/path/to/example-document.pdf \ -F instructions='{ "parts": [ { "file": "document" } ], "output": { "type": "pdf", "optimize": { "mrcCompression": true } } }' \ -o result.pdf
POST /api/build HTTP/1.1 Content-Type: multipart/form-data; boundary=customboundary Authorization: Token token=<API token> --customboundary Content-Disposition: form-data; name="document"; filename="example-document.pdf" Content-Type: application/pdf <PDF data> --customboundary Content-Disposition: form-data; name="instructions" Content-Type: application/json { "parts": [ { "file": "document" } ], "output": { "type": "pdf", "optimize": { "mrcCompression": true } } } --customboundary--
Licensing
To hyper-compress PDFs with Document Engine, the Hyper-Compression component needs to be included in your license. Contact Sales to add it. After the new component is added to your license, update the license or activation keys in your configuration.