Posted by a ceTe Software moderator
Hello,
The time taken to merge the PDFs is dependent on the contents included in the PDF. Our products are designed keeping performance in mind however, PDFs with a complex structure will take longer than PDFs with a simple structure. A complex logical structure is the most likely cause for this.
Please try using the MergeOptions class and set the LogicalStructure boolean property of it to false. Specify this Object while merging or appending the PDF to MergeDocument object and see it works for you. Below is a code sample.
PdfDocument pdf = new PdfDocument(@"Input PDF file path or byte array");
MergeOptions options = new MergeOptions();
options.LogicalStructure = false;
MergeDocument mergeDoc = new MergeDocument();
mergeDoc.Append(pdf, options);
mergeDoc.Draw(@"Output PDF file path");
If the pages contain images or are large, you could also be using a lot of memory and may want to consider using disk buffering. Here is a topic showing have to enable that:
Disk Buffering
If you continue facing any issues then please send over the following information to
support@dynamicpdf.com so we can look into it further.
1. Code sample used for merging.
2. Some sample PDFs using which we can recreate the behavior.
3. Time taken to merge the sample PDFs.
4. Exact version and build number of the DynamicPDF DLL file used in your application. You can find this information in DLL references properties (Version and Description fields) in Visual Studio.
Thanks,
ceTe Software Support Team