Big filesize when merging pdf's

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Big filesize when merging pdf's

DynamicPDF CoreSuite for .NET (v5) Forum

 Jan 20 2010 6:00 AM
Hello,

I have multiple PDF files (around 100) that I merge together by using the following code (in vb.net):

Dim aMergeDocument = New ceTe.DynamicPDF.Merger.MergeDocument()

For Each aFile In aFileList
  aMergeDocument.Append(aFile, ceTe.DynamicPDF.Merger.MergeOptions.Append)
Next

aMergeDocument.Draw(thePath)

The resulting pdf is around 6MB in size. When I open it in Acrobat and use File, Save as, the resulting file ends up being only around 500KB big.

All those PDF files have been made with DynamicPDF and all have the following similarities:
-they are all one page big
-they all use the same font, verdana
-they all have the same background: a pdf that contains an image

Would it be possible to reduce the size of this PDF just like Acrobat does?

Thank you
 Jan 20 2010 6:51 AM
Posted by a ceTe Software moderator
Hello,

The size of the PDF document depends on the data it has and it is not possible to reduce the file size using our product. The fonts, images etc which are present in the PDF documents you are merging will not be shared in this case in the final PDF which will reduce the file size.

If you are creating the PDF document from scratch then you can reuse some objects in different pages to reduce the size. You can refer to the Performance Considerations of Generator and Merger on our help documentation.

Thanks,
ceTe Software Support Team.
 Jan 29 2010 8:40 AM
Thank you for your answer,

All those pdf's are made from scratch using DynamicPDF, but aren't made all at once. The resulting pdf's are merged together at a later time by finding the various files on the disk, so those performance considerations, while useful, don't really solve my problem.

From what I found out, the merged pdf contains multiple copies of the Verdana font, and when I use the save as functionality of Acrobat it merges those fonts together so there is only one. This can be seen by looking at File->Properties, on the Fonts tab in Adobe Acrobat.
 Jan 29 2010 12:32 PM
Posted by a ceTe Software moderator
Hello,

When merging different PDF documents we do not check for the repeated objects from different PDF documents as this will decrease the performance of merging process when dealing with more number of PDF documents. In order to increase the performance we merge the PDFs as is.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 2:06 AM.