PDF Library for C# and VB.NET applications

The fastest way how you can get started with GemBox.Pdf library is by exploring our collection of C# and VB.NET examples. These are live examples that demonstrate various supported features in GemBox.Pdf.

System Requirements

GemBox.Pdf works on .NET Framework 3.5 or higher and platforms that implement .NET Standard 2.0 or higher.

Hello World

The following example creates a simple PDF document in C# and VB.NET code.

Screenshot
PDF Library for C# / VB.NET Screenshot

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

using GemBox.Pdf;

class Sample
{
    [STAThread]
    static void Main(string[] args)
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        PdfDocument document = new PdfDocument();

        // Add a first empty page.
        document.Pages.Add();

        // Add a second empty page.
        document.Pages.Add();

        document.Save("Hello World.pdf");
        document.Close();
    }
}
Imports GemBox.Pdf

Module Samples

    Sub Main()

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

        Dim document As PdfDocument = New PdfDocument()

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

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

        document.Save("Hello World.pdf")
        document.Close()

    End Sub

End Module

Check next sample.