Edit PDF files using incremental updates in C# and VB.NET

GemBox.Pdf allows users to modify PDF documents. Users should not have to wait for an entire file (which can contain hundreds of pages or more) to be rewritten each time modifications to the document are saved.

The PDF format allows modifications to be appended to a file, leaving the original data intact. The addendum appended when a file is incrementally updated contains only those objects that were actually added or modified.

Because the original contents of the document are still present in the file, it is possible to undo saved changes by deleting one or more addenda. The ability to recover the exact contents of an original document is critical when digital signatures have been applied and subsequently need to be verified.

For more information about PDF incremental update in GemBox.Pdf, see File Structure help page.

The following example shows how you can load a PDF document, add an empty page, and save the changes using the incremental update capability.

PDF file incrementally updated with GemBox.Pdf C#/VB.NET library
Screenshot of PDF file incrementally updated with GemBox.Pdf library
Upload your file (Drag file here)
using GemBox.Pdf;

class Program
{
    static void Main()
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        // Load a PDF document from a file.
        using (var document = PdfDocument.Load("%InputFileName%"))
        {
            // Add a new empty page.
            document.Pages.Add();

            // Save all the changes made to the current PDF document using an incremental update.
            document.Save();
        }
    }
}
Imports GemBox.Pdf

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        ' Load a PDF document from a file.
        Using document = PdfDocument.Load("%InputFileName%")

            ' Add a new empty page.
            document.Pages.Add()

            ' Save all the changes made to the current PDF document using an incremental update.
            document.Save()
        End Using
    End Sub
End Module

Want more?

Next example GitHub

Check the next example or select an example from the menu. You can also download our examples from the GitHub.


Like it?

Download Buy

If you want to try the GemBox.Pdf yourself, you can download the free version. It delivers the same performance and set of features as the professional version, but with some operations limited. To remove the limitation, you need to purchase a license.