Print Page | Close Window

Merged pdf is bigger than sum of merged files

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2223
Printed Date: 13 Aug 25 at 5:24PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Merged pdf is bigger than sum of merged files
Posted By: SebSil
Subject: Merged pdf is bigger than sum of merged files
Date Posted: 11 Apr 12 at 4:26PM
Hi,
I'm using Quick pdf library 8.14. with c#
I noticed that when i merges some pdf files (with MergeFileListFast or MergeFileList), the result is bigger than sum of merged pdf size.
It's about 50% more.

I opened then saved the file with acrobat and the size decreased significatively. 

So, i looked into the merged pdf with notepad++, i compared it with the one saved by acrobat and i found plenty of 'null' objects that were not present in the pdf saved by acrobat :

40 1 obj
null
endobj

where 40 1 is a variable sequence

I also found this kind of line, which doesn't exists in acrobat saved file :

0002439380 00001 n 

where 0002439380 is a variable sequence.

I looked into originals merged pdf files and i didn't find any occurency of the first pattern (obj null endobj). I found The second one but less than in the merge result.

I decided to delete all line that matched these patterns and the resulting pdf file was of the correct size (sum of merged ones) and not corrupted when opened in acrobat.

Is there a reason for quick PDF to add this "null object" when merging pdf files?

Thanks for any help.



Replies:
Posted By: Ingo
Date Posted: 11 Apr 12 at 7:20PM
Hi!

Yes... that's strange.
You should post your thread on the official support page.
There you can upload your pdf, too. Make a version -before- and
one version -after-:
http://www.quickpdflibrary.com/support/support-query.php

Cheers and welcome  here,
Ingo


Posted By: SebSil
Date Posted: 13 Apr 12 at 11:41AM
Hi Ingo,
Thanks for your reply.

I 've just post my thread onto QPDF official Support page.

Thanks,


Posted By: edvoigt
Date Posted: 23 Apr 12 at 1:24PM
Hi SebSil,

it would be nice, to see here the answer from QPDF, if there is one.

Thanks in advance,

Werner


Posted By: SebSil
Date Posted: 23 Apr 12 at 1:29PM
Hi edvoigt,
Here's the QPDF answer:

"The first PDF in the list contains thousands of unused entries in the xref table and QPL as creating the 'null' entries just to make sure the PDF stream is correct according to the PDF spec.

 

I need to talk to the lead programmer to see what can be done. We are looking to add a PDF cleanup feature in an upcoming release of QPL".

I haven't answered yet, but i have the same issue with most of pdf files i'm working with (from differents providers).




Posted By: edvoigt
Date Posted: 23 Apr 12 at 1:43PM
Hi,

a such cleanup would be very usefull, because there are a lot of PDFs in the wild, which are build in strange kinds. So I hope, the QPDF-people can make it.

Werner



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk