HTML jpg PDF XML PPT
  Product Family
PDF

Convert PDF to JPG in C#

PowerPoint .NET API for converting PDF documents to JPG images on NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms

Convert PDF to JPG in C#

How do I convert PDF to JPG in code?

Using Aspose.Slides for .NET , any developer or application can convert PDF to JPG format with just a few lines of C# code.

As a modern document processing API, Aspose.Slides for .NET exports PDF pages to JPG quickly. Aspose PowerPoint library allows you to convert PDF to JPG and many other file formats

To install Aspose.Slides: Open NuGet package manager. Search for Aspose.Slides and install it.

Or you can install Aspose.Slides by running this command from the Package Manager Console.

Package Manager Console Command


PM> Install-Package Aspose.Slides.NET

How to Convert PDF to JPG in C#

Developers and applications can convert PDF to JPG this way:

  1. Create an instance of the Presentation class.

  2. Load the PDF file.

  3. Add slides based on the PDF pages.

  4. Call the save method to save the slides as JPG images.

System Requirements

Before you run the PDF to JPG conversion C# code, your machine must have these prerequisities:

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms.
  • Development environment like Microsoft Visual Studio.
  • Aspose.Slides for .NET DLL has been referenced in your project.
 

C# code to convert PDF to JPG

using (Presentation pres = new Presentation())
    {
        pres.Slides.AddFromPdf("doc.pdf");
        pres.Slides.RemoveAt(0); // removes default empty slide

        for (var index = 0; index < pres.Slides.Count; index++)
        {
            ISlide slide = pres.Slides[index];
            slide.GetThumbnail(new Size(960, 720)).Save($"image-{index}.jpg", ImageFormat.Jpeg);
        }
    }
 
  • Free Online Converter

    How to Convert PPT to HTML in Python

    Other Supported Conversions

    Aspose.Slides supports conversion operations for many file formats

    PPT TO BMP (Bitmap Image)
    PPT TO EMF (Enhanced Metafile Format)
    PPT TO GIF (Graphical Interchange Format)
    PPT TO HTML (Hyper Text Markup Language)
    PPT TO PNG (PNG Image)
    PPT TO ODP (OpenDocument Presentation Format)
    PPT TO OTP (OpenDocument Standard Format)
    PPT TO PNG (Portable Network Graphics)
    PPT TO POT (Microsoft PowerPoint Template Files)
    PPT TO POTM (Microsoft PowerPoint Template File)
    PPT TO POTX (Microsoft PowerPoint Template Presentation)
    PPT TO PPS (PowerPoint Slide Show)
    PPT TO PPSM (Macro-enabled Slide Show)
    PPT TO PPSX (PowerPoint Slide Show)
    PPT TO PPTM (Macro-enabled Presentation File)
    PPT TO PPTX (Open XML presentation Format)
    PPT TO SVG (Scalable Vector Graphics)
    PPT TO SWF (SWF Format)
    PPT TO TIFF (Tagged Image Format)
    PPT TO XPS (XML Paper Specifications)