MergeDocument - The weight of the new pdf created is the same weight as the original file

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v8)  /  MergeDocument - The weight of the new pdf created is the same weight as the original file

DynamicPDF CoreSuite for .NET (v8) Forum

Hello,
 I'm using the MergeDocument method,
Trying to create 2 new files from one large file.
The goal is to divide the document into 2 documents.
The big file contains 60 pages, I'm trying to create a split from page 1 to 30 and from 31 to 60

My code looks like this:
PdfDocument bigPdf = new PdfDocument ("C: \\ temp \\ big.pdf");

MergeDocument pdf1 = new MergeDocument (bigPdf, 1, 30);
MergeDocument pdf2 = new MergeDocument (bigPdf, 31, 29);

The problem is that the newly created files remain the same weight as the original file.
what can be done?

Thanks in advance, Zohar
Posted by a ceTe Software moderator
Hello,

The PDF file size depends on the resources it has. If the PDF you are using uses fonts that are being used in both the sets of pages 1-30 and 31-60 then the final PDFs also will have the same fonts which contribute to the file sizes of the individual files.

You could try setting the MergeOptions to None and see if that helps to reduce the file size. You can refer to the MergeOptions
Class, Members and Document Optimization topic on our help documentation for more details.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 11:28 AM.