Convert PDF files to image in C# and VB.NET

GemBox.Pdf enables you to easily convert PDF files into different file formats in C# and VB.NET. For example, you can convert PDF files into image formats (PNG, JPEG or other) and XPS.

To do this, just load a PDF document and save it into another file format as in the following example. For more details about supported file formats in GemBox.Pdf, see Supported File Formats help page.

Converting PDF files into image formats and XPS is currently supported on .NET Framework (and in future on .NET Core for Windows).

Screenshot of PNG image converted from PDF file
Converted PDF file to PNG image in C# and VB.NET
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");

        using (PdfDocument document = PdfDocument.Load("%InputFileName%"))
            // In order to achieve the conversion of a loaded PDF file to image,
            // we just need to save a PdfDocument object to desired image format.
            document.Save("Convert.%OutputFileType%");
    }
}
Imports GemBox.Pdf

Module Program

    Sub Main()

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

        Using document As PdfDocument = PdfDocument.Load("%InputFileName%")
            ' In order to achieve the conversion of a loaded PDF file to image,
            ' we just need to save a PdfDocument object to desired image format.
            document.Save("Convert.%OutputFileType%")
        End Using

    End Sub
End Module

Check next example or download examples from GitHub.