Convert PDF Pages to JPG Images in C#

PDF is a versatile format that is commonly used for printing and sharing documents. However, there could be cases when you need to convert PDF files to image formats programmatically. To accomplish that, this article covers how to convert PDF to JPG images in C# from within your .NET applications.

C# API to Convert PDF to JPG - Free Download

Aspose.PDF for .NET is a powerful PDF manipulation API that lets you create and process PDF files from within your .NET applications. Furthermore, it allows you to convert PDF documents to other formats seamlessly. We will use this API to convert the pages from PDF documents to JPG format. You can either download the API or install it using NuGet.

PM> Install-Package Aspose.Pdf

PDF to JPG C# Conversion

The following are the steps to convert the pages in a PDF document to JPG images using Aspose.PDF for .NET.

The following code sample shows how to convert pages in PDF to JPG using C#.

C# Convert Single Page of PDF to JPG

You can also convert only a single page of PDF to JPG. In that case, you can access the desired page from Document.Pages collection. The following are the steps to convert only a single page of PDF to JPG.

The following code sample shows how to convert a single page in PDF to JPG.

C# PDF to JPG Converter - Get a Free License

You can get a free temporary license in order to use Aspose.PDF for .NET without evaluation limitations.

Conclusion

In this post, you have learned how to convert pages in a PDF file to JPG images using C#. The code samples have shown how to convert all or desired pages of PDF to JPG images. In addition, you can explore more about .NET PDF API using the documentation. In case you would have any questions or queries, you can contact us via our forum.

See Also