Is there a free way to convert a PDF document to a PNG image?
-
1I asked a similar question last year on Stack Overflow. You can [read the answers](http://stackoverflow.com/questions/955238/snapshot-image-from-pdf-document) there. – stevenvh Sep 08 '10 at 07:13
-
4Related: [How to convert a multi-page PDF file to PNG files, with one PNG file per page of the PDF document? (Windows)](http://superuser.com/q/243461/10259) – galacticninja May 08 '13 at 04:00
-
Open in Photoshop and save as PNG – user956584 Oct 20 '16 at 20:35
-
@Raymond (OP): I know you didn't ask for a command line version, but using imagemagick is more versatile and is objectively the more useful answer. I think you should accept that as the answer instead: https://superuser.com/a/185897/5761 – Nick Bolton Feb 10 '23 at 09:34
10 Answers
Personally I prefer the results obtained from pdftoppm from Poppler utilities:
pdftoppm -png myfile.pdf > myfile.png
If you have ImageMagick installed, you can just type:
convert myfile.pdf myfile.png
Note: To use ImageMagick, you may also need Ghostscript.
Note: On Windows, convert is a system program, so you'd need to run the ImageMagick convert binary by using it's full path.
To install to install Poppler from the command line (provides the pdftoppm command)...
On Windows, you can use Chocolatey:
choco install poppler
On Mac, you can use Homebrew:
brew install poppler
- 3,330
- 9
- 39
- 51
- 10,755
- 3
- 34
- 27
-
7on mac with homebrew I had to install imagemagick and ghostscript for this to work. brew install imagemagick brew install ghostscript – Andreas Feb 20 '12 at 16:01
-
18
-
3Why do you prefer the results of pdftoppm? I notice that the default output resolution is higher than imagemagick (although this can be changed), but apart from that they seem comparable on my test file. – Sparhawk Feb 14 '13 at 04:22
-
Poppler does a much better job for me - I've got an input pdf with CYMK colours, with imagemagick the colours come out a crazy bright cyan. Also convert takes ~8 seconds and pdftoppm takes less than 0.5 seconds. Thanks for the pointer! – maxpenguin Mar 08 '13 at 02:38
-
4converting multipage PDF with poppler will look more like this: `pdftoppm -png myfile.pdf myfile` – Roman Protsiuk Jul 23 '13 at 15:30
-
Informally comparing them head to head, I found pdftoppm about 5x (for PNG) to 16x (for JPG) faster once I adjusted for the same resolution. My test file was a scientific paper 10 pages long. – sandover Dec 11 '13 at 22:41
-
4See http://blog.alivate.com.au/poppler-windows/ for windows binaries of poppler and use `pdftocairo -png` – kromuchi Jan 09 '14 at 11:51
-
2Note that if you use imagemagick, you may also need ghostscript: http://stackoverflow.com/q/32466112/1157054 – Ajedi32 Jan 07 '16 at 02:26
-
1`attempt to perform an operation not allowed by the security policy `PDF' ` – Vimos May 09 '22 at 07:24
-
@Vimos Might be a bug in your version of ghostscript or imagemagick, but see [here](https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion). – frabjous May 09 '22 at 12:27
This is overkill for what you need, but in the absence of another answer, GIMP can do this for you. Just install it, open the PDF, and save-as a PNG.
- 5,686
- 8
- 52
- 83
-
14No more overkill than the 5 or so 'free' programs I installed that left a watermark on the image. Worked beautifully, thanks! – Raymond Sep 08 '10 at 01:00
-
1This is exactly what I needed. I wanted to convert a PDF to a high-resolution PNG file, and using GIMP worked really great! – Mas Sep 06 '11 at 19:27
-
1Thanks, have tried several tools, either with watermarks or other limitations. GIMP works fine. – Horst Walter Oct 22 '11 at 00:08
-
9Gimp works great for a single page, but I don't see a simple way to export lots of pages automatically. I'm sure if you know gimp well you could use automation tools to get it working. But perhaps pdftoppm is better. – chrishiestand Mar 05 '13 at 23:07
-
-
Thanks @Brad, but I don't think it is sufficient to stand alone. It's really just an addendum to your answer. – chrishiestand Mar 08 '13 at 02:25
-
-
While this is an old post, I think it may be worth pointing out that GIMP is not an ideal solution - at least I remember it not readin a pdf file generated by R correctly. Using pfftoppm with R generated pdf plots produces the correct image. (And Adobe Acrobat 9 Pro works too if you have it - can't speak about other versions.) – DetlevCM Mar 13 '16 at 14:28
-
Just don't make the mistake of trying to actually edit the PNG with GIMP if you know how to use any other image editor. Convert and export. – Noumenon Oct 13 '16 at 11:23
-
For multi page pdfs you can File>Open_as_layers then File>Export_Layers using the [export layers as png plugin](http://registry.gimp.org/node/28268) – Mr Purple May 01 '17 at 21:10
-
An update may be in order. With the 2.8.16 version of GIMP, I found that "Export as" is used instead of "Save as". – GreenMatt Sep 13 '17 at 20:46
-
Not a bad answer. I had to deal with a very large detailed PDF and I found Sketch totally locked up on me. Memory limitation could exist for GIMP as well? Went with the command line answer. – Foxinni Feb 12 '23 at 11:29
Windows: Install PDFCreator and open your PDF. Print it to the PDFCreator printer (or whatever you called it) and hit save. When you hit save, after choosing a filename, set the filetype to PNG.
Linux: Install ImageMagick (on Ubuntu: sudo apt-get install imagemagick) and then in a terminal type: convert [Input PDF File.pdf] [Output PNG File.png].
Mac OS X: Open the PDF in Preview and in the Save As dialog, set the filetype to png.
- 14,432
- 9
- 56
- 76
-
On macOS you can also use the build-in `sips` tool: `sips -s format png the_pdf_file.pdf --out the_png_file.png` – goetz Apr 29 '19 at 00:13
You could also use GS:
"c:\Program Files\gs\gs9.10\bin\gswin64.exe" -dBATCH -dNOPAUSE -sDEVICE=pnggray -r300 -dUseCropBox -sOutputFile="path_to_png_files\pdffilename-%03d.png" "path_to_pdf_file\pdffilename.pdf"
The path to GS should be adjusted based on your installation.
The DEVICE parameter here will specify grayscale. You can also output with color instead. These settings will allow you to output to 24-bit color, 300 dpi PNG files using the RGB.icc color profile:
-sDEVICE=png16m -sOutputICCProfile=default_rgb.icc -r300
Compared to convert, GS seems to run much faster, and it is more suitable for big batches of conversion.
- 12,697
- 11
- 55
- 72
- 337
- 4
- 9
-
3Signed up for super user just to upvote this. Now if I only had any hope of remembering it... – joeA Oct 10 '14 at 02:47
-
1+1 for inkscape. Because you can edit the pages, rework the diagrams and save as svg or even as pdf etc... – Alain Pannetier Oct 22 '15 at 13:31
Which OS do you use?
On a Mac, it's as simple as opening the PDF in the Preview app and saving it as a PNG.
On http://www.zamzar.com/, you can convert many file types for free also.
- 3,923
- 3
- 27
- 34
If using Windows, I would use Bullzip PDF Printer, simply choose print and then select .PNG as the file type.

- 116,650
- 19
- 182
- 266
-
2[Make sure to uncheck the option to install toolbars and edit browser home page and search settings when installing Bullzip PDF Printer.](http://i.stack.imgur.com/5aBN0.png) – galacticninja May 08 '13 at 04:02
The docupub online tool works quite well, you get an image per page: http://docupub.com/pdfconvert/
- 174
- 8
if you don't don't feel like downloading anything just copy the picture and paste in paint then save as PNG and there you have it. no watermarks, not downloading files.. simple
- 21
- 1
-
-
@DanielBeck He's saying to open in a PDF viewer, then copy and paste – Canadian Luke Jun 04 '13 at 18:01
This free online tool:
will convert a PDF file to a PNG image inside your browser. You won't need to install anything.
If the PDF is multi-page, it will create a new image for each page.
- 319
- 2
- 3