Which DPI should you choose for PDF to PNG?
PDF, which Adobe launched in 1993 and which is now the international standard ISO 32000-2, describes a page without pixels: it is measured in units of 1/72 inch, so a US Letter page is 612 × 792 units (8.5 × 11 inches). Converting it to PNG means drawing it at some number of pixels per inch, the DPI. The pixel size is simply the page size in inches times the DPI, and the pixel count grows with the square: 300 DPI has four times the pixels of 150 DPI. For the two common paper sizes:
| DPI | US Letter (8.5 × 11 in) | A4 (210 × 297 mm) |
|---|---|---|
| 72 | 612 × 792 px | 595 × 842 px |
| 96 | 816 × 1,056 px | 794 × 1,123 px |
| 150 | 1,275 × 1,650 px | 1,240 × 1,754 px |
| 300 | 2,550 × 3,300 px | 2,480 × 3,508 px |
| 600 | 5,100 × 6,600 px | 4,961 × 7,016 px |
- 150 DPI (the default here) is what we suggest for screens, sharing and email.
- 300 DPI is what we suggest for print, and keeps text crisp when someone zooms in.
- 600 DPI is for fine print, small type and line drawings; files are large and each page takes longer.
- 72 and 96 DPI make small images: 72 gives one pixel per PDF unit, and 96 matches the 96 pixels per inch that web pages and PDF.js use for 100% zoom. Small text looks soft at either.
What we measured with this page in Chrome on a desktop PC (sizes as the converter shows them, where 1 MB is 1,048,576 bytes):
| Page | 72 DPI | 150 DPI | 300 DPI | 600 DPI |
|---|---|---|---|---|
| A Letter page of text and a table | 143.4 KB | 482.5 KB | 1.2 MB | 3.0 MB |
| A page that is one photo (8.5 × 6.37 in) | 580.0 KB | 2.4 MB | 5.2 MB | not measured |
A 40-page A4 text document took 3.5 seconds in all at 150 DPI and 8.5 seconds at 300 DPI. Each saved PNG also records its DPI (in the PNG’s pHYs chunk, as pixels per metre), so layout and print programs that read it place it at the page’s real size. PDFs made by some apps use a page a point or two larger than the standard size, so their PNGs can differ from the table by a few pixels.
Why does PDF to PNG come out blurry?
Almost always because the page was drawn with too few pixels. The usual causes:
- A low default. Command-line tools pick a DPI when you give none: Ghostscript’s default is “usually 72 dpi” and pdftoppm’s is 150 DPI. A Letter page at 72 DPI is only 612 × 792 px.
- Enlarging afterwards. Scaling a small PNG up only stretches its pixels. Convert again at a higher DPI instead.
- A scanned PDF. A scan is a photo of the paper at the scanner’s resolution. Rendering it at a higher DPI than it was scanned at makes the PNG bigger, not sharper.
A PNG of a set width in pixels
For slides, websites, e-readers and screens you often need a pixel size, not a DPI. Choose Pixel width and type the width: every page comes out that many pixels wide (unless that would pass the size limit below) and keeps its shape, and the DPI follows from the page’s size. For example, a Letter page at 1,920 pixels wide is 1,920 × 2,485 px, which is 225.9 DPI. In a PDF with pages of different sizes, each page gets the same width.
PDF to PNG with a transparent background
A PDF page has no background of its own: viewers paint it white. With Background: Transparent, this converter leaves out that white, so wherever the page draws nothing, the PNG is see-through. That suits logos, signatures, stamps and diagrams exported from drawing programs. In our test, an A4 flyer of shapes and text came out with see-through corners and solid shapes.
It cannot make transparent what the PDF itself fills:
- a scanned page is one opaque photo;
- a page that paints its own white or coloured background keeps it;
- a photo in the PDF keeps its own background.
Removing a background like that is a different job: the transparent background maker can clear a plain colour from the PNG afterwards.
What is kept, and what changes
The page is drawn by PDF.js, the PDF renderer Mozilla builds into Firefox, the way a viewer shows it: the visible page area (the crop box), page rotation, mixed page sizes, filled-in form fields and annotations. In our tests it rendered JPEG 2000 and fax-compressed (CCITT) images, CMYK colours, and Japanese text in a font the PDF did not include (drawn with a Japanese font installed on our test PC).
- PNG is lossless, so what is drawn is saved exactly, pixel for pixel. But the drawing itself turns text and vector shapes into pixels at the DPI you chose: the PNG has no selectable text, no links and no layers.
- Colours are saved as RGB, because PNG has no CMYK. CMYK colours from print PDFs are converted on the way, so they will not exactly match a printer’s proof.
- Fonts embedded in the PDF are used as they are. For a font the PDF only names, PDF.js uses a stand-in, often a font on your own device, so the letters can look different from the author’s screen.
- XFA forms, an older kind of dynamic form, are not drawn: you get whatever the PDF provides for viewers that do not support XFA.
Password-protected PDFs
A PDF can have two kinds of password. Without the one that opens the file, nothing can draw its pages: this page asks for it, uses it in your browser to open the file, and does not save or send it. A permissions password only restricts printing or copying; the file still opens, and in our test such a PDF converted without asking for anything. This converter does not remove or change any protection: it only reads the PDF, and the original file is not altered.
Very large pages
Each PNG is limited to 50,000,000 pixels and to 32,767 pixels on its longer side. Browsers have their own canvas limits, and going past them “renders the canvas unusable”, in MDN’s words. A page that would be bigger is drawn at the highest DPI that fits, and the converter says so. A 200 × 200 inch poster page, the largest page size the PDF specification recommends at the default unit (14,400 × 14,400 units), would be 30,000 × 30,000 px at 150 DPI, so it is saved at 35 DPI, 7,000 × 7,000 px. If the browser refuses even that, the page is tried again at up to 16,777,216 pixels (4,096 × 4,096), the canvas limit Safari on iPhone and iPad had until 2024.
Should you convert PDF to PNG or JPG?
PNG for pages of text, tables, charts and drawings: MDN notes that lossy compression applied to “content requiring sharpness, like diagrams or charts, can produce unsatisfactory results”, and that PNG is “preferred over JPEG for more precise reproduction”. PNG is also the one with transparency. For pages that are mostly photos, a JPG is far smaller: the photo page above made a 2.4 MB PNG at 150 DPI, and the image converter on this site turned that PNG into a 403.9 KB JPG at its default quality. This page makes PNG only; to get JPGs, convert the PNGs with the image converter.
Other ways to convert PDF to PNG: Mac, Windows, Acrobat, command line
- Mac: Apple’s guide for Preview is to open the file, choose File → Export, then pick PNG in the Format menu.
- Windows: we found no Microsoft page describing a built-in way to save a PDF page as PNG. Use this page in any browser, or a screenshot for a quick, low-resolution copy.
- Adobe Acrobat exports PDF to PNG with its own resolution setting (Convert → Image format → PNG).
- Command line:
pdftoppm -png -r 300 input.pdf page(poppler; 150 DPI if you leave out-r, and it uses the media box unless you add-cropbox). Ghostscript’spng16mdevice writes RGB PNGs andpng16malphatransparent ones; set the DPI with-r.
Why nothing is uploaded
Many online converters send your PDF to their servers. Here, PDF.js is downloaded once from this site and runs in your browser tab; the part that reads the PDF is only allowed to load its own files (fonts, character maps and image decoders) from this site. While we converted our test PDFs, no request carried any part of a file; the only other requests went to Google Analytics, for the page-view statistics described in the privacy policy. You can check: open your browser’s developer tools on the Network tab while converting.