We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Avoid saving prior to documents merge

Hi there,

We are using version 23.0.0 of Aspose.PDF for .NET to apply headers and watermarks to individual PDFs and the concatenate all of them into one final big PDF.

We observed that applying a header (by adding a Table object in the Header of each page) on each of the individual documents requires that a save operation is triggered before the Concatenate operation is executed, otherwise the headers will not exist in the final PDF.

In the MergeDocuments.zip (68.6 KB) code that I attached, this is Step 1.2 from the AlterDocument method. Running that sub-step will ensure that the headers are in the final PDF.

Is there a way around using this trick to apply the header? We are working with large documents and we are trying to keep the memory consumption to the minimum.

Thank you!

@gwert

Thanks for contacting support.

We have logged an investigation ticket as PDFNET-48238 in our issue tracking system for this behavior of the API. We will investigate reasons behind this and will keep you posted with the status of ticket resolution. Please be patient and spare us some time.

We are sorry for the incovenience.