How can I convert PDF files into JPG?

Convert pdf file to jpg asp.net

  • I have just come across a scenario where I need to convert PDF files to JPG files. What I would preferably like to do is, when uploading the PDF files, I would like to keep the original PDF file and save it to a folder named "pdf" and also from that PDF I would like to save a JPG version of the PDF to another folder named "jpg". Is this something that can be achieved using C#. If so could someone please direct me in the right direction?

  • Answer:

    You can surely do that using C# if that is what you prefer but you would best use some 3rd party library for converting the PDF to JPG. You might want to have a look at the freely available and powerful http://www.imagemagick.org/. It's capable of doing what you want and also provides some .NET bindings (as well as bindings to several other languages). Btw, this http://stackoverflow.com/questions/680948/converting-a-mutiple-paged-pdf-to-a-single-image is very similar to yours.

Jason at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

You can use http://www.aspose.com/categories/.net-components/aspose.pdf.kit-for-.net/default.aspx to convert PDF file to either a single TIFF image, or convert pages to individual images. Supported formats include: TIFF, JPEG, BMP, PNG and GIF. You may also get a trial version; and for comprehensive testing a fully functioning 30 days license is also offered. The support for this component is offered through Aspose forums.

Shahzad Latif

Disclaimer: I'm working for this company. You can use http://www.sautinsoft.net/help/pdf-to-word-tiff-images-text-rtf-csharp-vb-net/index.aspx library for this. This component allows to convert from Pdf to images (jpeg, GIF, PNG, Multiple Tiff). By using it you can do what you need! Sample code to convert all pages from PDF to JPEG in C#: SautinSoft.PdfFocus f = new SautinSoft.PdfFocus(); f.OpenPdf(@"d:\book.pdf"); if (f.PageCount > 0) { //save all pages to jpeg files, 120 dpi f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg; f.ImageOptions.Dpi = 120; for (int i=0; i<f.PageCount; i++) f.ToImage(@"d:\page" + (i+1).ToString() +".jpg", i+1); }

SautinSoftcompany

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.