Merge Document into existing page

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Merge Document into existing page

DynamicPDF CoreSuite for .NET (v7) Forum

 Jul 31 2017 1:35 PM
Is there any way to merge an external PDF document into the document you are building starting at a position in the last page of the document. 

Basically we want to be able to append multiple PDF documents that may be less than a full page in size and be able to append these into the flow so that they are not separated by page breaks, but will still flow across pages.

These imported PDF documents contain text and images so we cannot just extract out the text and append the text to the document.

Any help would be appreciated.
Posted by a ceTe Software moderator
Hello,

Yes, it is possible to import and merge pages from an external PDF into a new PDF that is being built. You can do this in a couple of different ways:

1. Import a page from an existing PDF and add it as separate page at the end of the new PDF. For additional samples please refer to the following documentation link.

            //Create a new document object.
            Document document = new Document();

            //add new pages.
            document.Pages.Add(new Page());
            document.Pages.Add(new Page());
            document.Pages.Add(new Page());

            //get second page from an existing PDF.
            ImportedPage existingPDFPage = new ImportedPage(@"f:/ExistingDoc.pdf", 2);
            //add the page at the end of the new PDF.
            document.Pages.Add(existingPDFPage);

            //save the new document.
            document.Draw("final.pdf");

2. Import pages from an existing PDF and add them on a single page on the new PDF. Here you have the option to scale the imported pages if needed. For additional samples please refer to the following documentation link.


            //Create a new document object.
            Document document = new Document();

            //add new pages.
            document.Pages.Add(new Page());
            document.Pages.Add(new Page());
            document.Pages.Add(new Page());

            Page pageWithExistingPDFContent = new Page();

            // Create ImportedPageArea objects and add it to the new page
            ImportedPageArea existingPageContent1 = new ImportedPageArea(@"f:\DocumentD.pdf", 2, 0, 0, 0.5f);
            pageWithExistingPDFContent.Elements.Add(existingPageContent1);
            ImportedPageArea existingPageContent2 = new ImportedPageArea(@"f:\DocumentD.pdf", 3, 0, 300, 0.5f);
            pageWithExistingPDFContent.Elements.Add(existingPageContent2);
            document.Pages.Add(pageWithExistingPDFContent);
           
            //save the new document.
            document.Draw("final.pdf");


Thanks,
ceTe Software Support Team.
After merge existing PDF document,

Some of unwanted text overlay in PDF pages like Dynamic PDF etc..

Please help me to fix this issues.
 Nov 08 2019 11:08 AM
Posted by a ceTe Software moderator
Hello,
 
It looks like you are using the DynamicPDF product in evaluation mode. The DynamicPDF product adds a watermark and evaluation text on each page of the output PDF.

In order to avoid the watermark on the output PDFs being created, you will need to add a respective DynamicPDF product license key to the application which can be obtained from our Customer Area using your serial number.

If you already own a DynamicPDF product license, are licensing the application and getting watermark on the output PDF then please send over the following information to support@dynamicpdf.com so we can look into it further.

1.        Exact watermark numbers[x:x:x:x] displayed on the output PDF or output PDF having watermark on it.
2.        Exact version and build number of the DynamicPDF DLL file used in the application. You can get this information in DLL references properties (Version and Description fields) in Visual Studio.
3.        DynamicPDF license key added to the application.
 
Include the forum link in your email. Please do not share your licensing information (license key or product serial number) in the forums.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 9:10 PM.