Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

PDFDocument.Merge reduce combined PDF file size Options
Jeff Whitlock
Posted: Tuesday, April 18, 2017 3:15:59 PM
Rank: Newbie
Groups: Member

Joined: 6/10/2016
Posts: 6
Currently using the PDFDocument.Merge method to combine multiple existing PDF files into one document. The resulting PDF file size is the sum of the individual sizes of the PDFs being processed. For instance, if I have three PDF files of 200k, 170k, and 130k to combine, the resulting combined PDF file will be around 500k in size.

Does the Merge method (or another PDFDocument method) have the ability to compress the resulting PDF file by de-duplicating all of the redundant elements in the documents? Adobe Acrobat, for instance, has a merge function that will take either multiple PDF files, or a large PDF file and merge redundant elements to bring the file size down.

The PDF files that I'm combining are all single page PDF documents of the same format (invoices). Experimenting with Acrobat was successful in significantly reducing the size of combined files, but I'd like to be able to do it in the app I'm developing using the EO components if possible.

How can the resulting combined file size be reduced?

Thanks!
eo_support
Posted: Tuesday, April 18, 2017 3:36:30 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hi,

It does do that to a certain degree. Specifically, it tries to de-duplicating the font glyph information, which usually is the biggest contributor to large file size. However to faithfully preserve everything, we have a rather strict criteria on what font data we will try to de-duplicate: the two fonts in the two files must be an exact match except for their subset (PDF file does not embed the whole font file that covers all characters, instead it only embed a subset of all characters used by the file). In the past we have less strict criteria which results in smaller files but sometimes cause problems when the two fonts may have the same name but are in fact slightly different.

We do not do de-duplicating or re-compressing images. Again, this is to the principle of preserve everything as much as possible since most of the time a lose of quality is not acceptable to our customers.

Thanks!
Jeff Whitlock
Posted: Tuesday, April 18, 2017 3:51:45 PM
Rank: Newbie
Groups: Member

Joined: 6/10/2016
Posts: 6
Thanks for the info.

I had a situation where combining invoices into one PDF file using PDFDocument.Merge resulted in a 25mb PDF file size for the combined files. When we ran it through Adobe Acrobat Pro's merge option, it reduced it to about 1.4mb in size, which indicated there was quite a bit of duplicate information in it from the combined files.

It would be a nice enhancement to the EO component to be able to get some combined file size reductions like that while we're doing the merge.

Thanks again for the clarification.
eo_support
Posted: Tuesday, April 18, 2017 5:14:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 19,333
Hi,

You can send the files to us and we will be happy to take a look to see what we can find. See here for information on sending test files to us:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.