We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Merging PDF

I'm trying to append 900 PDF files for creating an unique PDF file.
The operation is OK, but all the PDFs all loaded in memory.
The code for the operation is:

Dim paths() As String = Directory.GetFiles("c:\tmp\testpdf\949pdf")

Dim pdf As PdfDocument = PdfDocument.Merge(paths)

pdf.Save("c:\tmp\testpdf\totale.pdf")
pdf.Close(True)

The memory increases a lot.
Is there a way for avoid loading all PDF files in memory? ...or for flushing memory?

1 Reply

AG Angappan G Syncfusion Team July 15, 2010 07:01 AM UTC

Hi Felice,

Thank you for your interest in Essential Studio.

We can reduce the memory usage by merging one document at a time,please refer the sample for more details.

Sample Link:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=95460578662812.zip

Please try this and let us know if you have any queries.

Regards,
Angappan.

Loader.
Live Chat Icon For mobile
Up arrow icon