Examples

Adding new content to existing page in PDF (.NET Core/Framework)

Adding new page or new content to existing page in PDF using DynamicPDF Merger is simple and easy.

How to Add New Content to a Page in C#

Below are the steps and sample code to add new content to existing page in PDF using the DynamicPDF Merger product.

Steps for Adding new content to existing PDF

  1. Create a MergeDocument object.
  2. Create a Page object pointing to the specific page in the MergeDocument.
  3. Add desired page element to the Page.
  4. Save the PDF document.

Sample Code - C#

MergeDocument document = new MergeDocument( pdfFilePath );
Page page = document.Pages[0];
page.Elements.Add( new Label( "New Content", 0, 0, 512, 12 ) );
document.Draw(@"C:\Output.pdf");

How to New Page to a PDF in C#

Below are the steps and sample code to add new page to PDF using the DynamicPDF Merger product.

Steps for Adding new Page

  1. Create a MergeDocument object.
  2. Create a Page object with necessary parameters.
  3. Add desired page element to the Page.
  4. Add Page to the Document.
  5. Call the Append method on the Document.
  6. Save the PDF document.

Sample Code - C#

MergeDocument document = new MergeDocument();
Page page = new Page( PageSize.Letter, PageOrientation.Portrait );
page.Elements.Add( new Label( "Cover Page", 0, 0, 512, 12 ) );
document.Pages.Add( page );
document.Append(@"C:\DocumentA.pdf");
document.Draw(@"C:\Output.pdf");

Getting Started

NuGet Package

DynamicPDF Merger is available on NuGet and is part of the ceTe.DynamicPDF.CoreSuite.NET package. The Core Suite package includes Generator, Merger and ReportWriter.

NuGet Package ID: ceTe.DynamicPDF.CoreSuite.NET

DynamicPDF Merger Information

More information can be found here:

Java and COM/ActiveX Platforms

The DynamicPDF Generator is also available for Java and COM/ActiveX. Refer to the respective product pages for more details.

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!