Forum How do I...?

How does PDF compression work?

amirraminfar
Hey guys,

We have had a couple questions from our printer vendor. We are wondering how PrinceXML handles compression?

So a couple of questions:

- If we batch convert 1000 a pdfs, and all those PDFs have identical image in common, does Prince optimize to only have one copy of that in the PDF? Does compression do anything here?
- Do you know if compressing PDF files are expensive when reading the PDF files?
- Any other advice to decrease the size of the PDF files?

mikeday
If you make one very big PDF file, bitmap images like JPEG/PNG/etc. should only appear once in the PDF. However, SVG images will be repeated.
amirraminfar
OK thanks. I had asked a couple other questions too, would you mind addressing those too?
mikeday
Sorry, compression should not noticeably affect reading time. Reducing the size of PDF files depends on what they contain. Bitmap images can be converted to JPEG and reduced in resolution or quality, for example. Large fonts can be subset. If you have thousands of link annotations these can also take up space in the PDF file.