GemBox.Pdf is a .NET component that enables developers to read, write and update Portable Document Format (PDF) files from .NET applications in a simple and efficient way.

Get and set document information in C# and VB.NET

With GemBox.Pdf, you can get and set PDF document information (document properties) in your C# or VB.NET application.

The following example demonstrates how to set document properties of an existing PDF document.

PDF Library for C# / VB.NET Screenshot

See the full code below, use Run Example to execute.

Upload your file(Drag files here)

Download a sample file

using System;
using GemBox.Pdf;

class Sample
    static void Main(string[] args)
        // If using Professional version, put your serial key below.

        PdfDocument document = PdfDocument.Load("Reading.pdf");

        // Get document information.
        PdfDocumentInformation info = document.Info;

        // Modify document information.
        info.Title = "Document Information Example";
        info.Author = "GemBox.Pdf";
        info.Subject = "Introduction to GemBox.Pdf";
        info.Keywords = "GemBox, Pdf, Examples";

        document.Save("Document Information.pdf");
Imports GemBox.Pdf

Module Samples

    Sub Main()

        ' If using Professional version, put your serial key below.

        Dim document As PdfDocument = PdfDocument.Load("Reading.pdf")

        ' Get document information.
        Dim info As PdfDocumentInformation = document.Info

        ' Modify document information.
        info.Title = "Document Information Example"
        info.Author = "GemBox.Pdf"
        info.Subject = "Introduction to GemBox.Pdf"
        info.Keywords = "GemBox, Pdf, Examples"

        document.Save("Document Information.pdf")

    End Sub

End Module

Check next sample.