Merge multiple pdf documents

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Merge multiple pdf documents

DynamicPDF CoreSuite for .NET (v11) Forum

 Mar 20 2021 1:17 PM
Hi,
I have multiple pdf documents and each of those documents can have fields and images. I can fill individual pdfs by using Mergedocumets. My question is how can I merge these MergeDocuments into one?
 Mar 23 2021 1:38 PM
Posted by a ceTe Software moderator
Hello,

You can achieve your requirement by merging all PDFs and then fill in the form fields using the full form field name. Here is a code sample:

            MergeDocument finalDocument = new MergeDocument();
           
            PdfDocument pdf = new PdfDocument(@"C:\FromD\temporary\fw9AcroForm_13.pdf");
            finalDocument.Append(pdf);
            //Append another document.
            PdfDocument pdf1 = new PdfDocument(@"C:\FromD\temporary\AllPageElements.pdf");
            finalDocument.Append(pdf1);
           
            //Once you merge all PDFs then fill fields in the PDF using full form field names.
            finalDocument.Form.Fields["full form field name"].Value = "Value to be filled";
          
            finalDocument.Draw(@"Output PDF file path");

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 2:37 PM.