Skip to main content

New Content in existing PDF

Version: 12.0

Adding New Content to Existing PDFs

DynamicPDF Core Suite for .NET makes adding new elements to a page in an existing PDF a breeze. The following C# examples illustrate adding new elements to an existing page and then creating a new page to add to an existing PDF.

Watch the Video​

YouTube thumbnail: Watch video: Modifying and Adding Pages in Existing PDFWatch video: Modifying and Adding Pages in Existing PDF

How to Add New Content to Page​

The following steps and C# sample code illustrate adding new content to an existing page in PDF using DynamicPDF Core Suite for .NET.

Steps for Adding New Content to an Existing PDF​

  1. Create a MergeDocument object.
  2. Create a Page object pointing to the specific page in the MergeDocument instance.
  3. Add desired page elements to the Page instance.
  4. Add the Draw method to save the merged PDF.

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("Output.pdf");

How to Add New Page to PDF​

The following steps and C# sample code illustrate adding a new page to a PDF using DynamicPDF Core Suite for .NET.

Steps for Adding a New Page​

  1. Create a MergeDocument object.
  2. Create a Page object and set its dimensions.
  3. Add desired page elements to the Page instance.
  4. Add the Page instance to the MergeDocument instance.
  5. Add the Append method on the MergeDocument instance.
  6. Add the Draw method to save the merged PDF.

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("DocumentA.pdf");
document.Draw("Output.pdf");

GitHub Project​

Examples are provided in C# and VB.NET. Clone or view the example project at GitHub. This example code is contained in the following files.

View source on GitHub: Core Suite .NET Core Examples

Getting Started​

Get started easily by installing DynamicPDF Core Suite for .NET through NuGet or manually. Then, refer to the documentation for more information on using and purchasing the product.

NuGet Package​

The easiest way to install DynamicPDF Core Suite is by obtaining the NuGet package using Visual Studio's Package Manager. You can also obtain the NuGet package by downloading it directly. Refer to the installation documentation for more information.

Get ceTe.DynamicPDF.CoreSuite.NET from NuGet

DynamicPDF Core Suite Information​

DynamicPDF Core Suite for .NET combines creating, merging, and visual report creation into one powerful product for creating PDF documents. It is ideal for anyone who needs to generate PDF documents or reports or work with existing PDFs in their applications. With a free Evaluation Edition to try and with flexible and royalty-free licensing options, why not start using DynamicPDF Core Suite for .NET today!

More Information on Combining PDFs​

Available on Other Platforms​

DynamicPDF Core Suite is also available for the Java and COM/ActiveX platforms. Refer to the respective product pages for more details.