PDF to PNG Converter
Draws every page of a PDF as a PNG in your browser, at the scale you pick, and says which parts are exact and which are substituted.
This tool needs JavaScript: the pages are drawn in your browser, and the file is never uploaded.
A PDF point is 1/72 inch, so 2× puts an inch at 144 pixels. Higher is sharper and heavier.
Drawing the pages…
No PDF yet. Each page is drawn again from the instructions in the file: the geometry is exact, and the type is set in a substitute face because the fonts inside a PDF are not rasterised here.
Every page becomes a PNG, drawn in your browser from the instructions inside the file rather than uploaded to somebody’s server and rendered there.
A PDF page is a small program: set a transform, build a path, fill it, choose a font, move here, paint these characters. Running that program onto a canvas gets the geometry, the colours and the photographs exactly right, because those are numbers and bytes that the file carries. Type is the part that is approximate. The fonts inside a PDF are font programs, and turning one into pixels means implementing TrueType and CFF outlines, which is a large piece of software in its own right. So the text is set in the nearest of Helvetica, Times and Courier, positioned by the file’s own character widths.
That trade is the whole design. On a report, an invoice or a form the result is the page you expected. On something set in a distinctive face it is visibly a stand-in, and the panel says so under every conversion rather than letting you find out.
How to use
- Choose a PDF, or drop one on the box.
- Pick the scale. 2× is right for the screen, 3× or 4× for print or for reading small type.
- Download a single page, or take all of them as a zip.
Example
A four page invoice at 2×:
4 of 4 pages drawn at 2× · 1.8 MB zipped
Page 1: 1190×1684, 61 text runs, 1 image
Page 2: 1190×1684, 88 text runs, 0 images
Page 3: 1190×1684, 40 text runs, 0 images
Page 4: 1190×1684, 12 text runs, 0 images
The text is set in a substitute face, because the fonts inside a PDF are font
programs rather than pictures. Positions and widths come from the file, so the
layout is the original one.
The counts are there so an empty page is obvious: a page reporting no text runs and no images produced a blank PNG, which means the content used something this does not draw rather than that the page was blank.
Pitfalls
The type is substituted, not rasterised. Helvetica for the sans faces, Times for the serif ones, Courier for the fixed-width ones, chosen from the font’s own name. Widths come from the file, so words land where they landed in the original and the shapes of the letters are not the original shapes.
A scanned page comes out perfectly. It is a photograph, and photographs are reproduced exactly. The irony is worth knowing: the pages that convert most faithfully are the ones with no text in them.
Some images cannot be decoded here. JPEG 2000, JBIG2 and the fax encodings are formats no browser decodes. Those images are left out and counted, rather than replaced with something approximate.
Encrypted PDFs are refused. With any password set, including the owner password that only restricts printing, the streams are scrambled. Undoing that is not something this does.
Transparency groups and soft masks are approximate. A drop shadow or a blend mode may come out flatter than in a viewer. The geometry is right; the compositing is simplified.
Thirty pages at a time. Past that the tab is holding more bitmaps than it can, so a long document is drawn to the limit and the count says how many pages were left.
Big scales get big fast. A4 at 4× is about 3,300 by 4,700 pixels a page, which is a few megabytes of PNG each. The zip is assembled in memory, so 30 of those is a large amount of memory.
Compatibility
The drawing happens on a canvas in this tab. Nothing is uploaded, and after the page has loaded the tool works with the network off.
Compressed streams are inflated with the browser’s own DecompressionStream, and JPEGs are decoded by
the browser’s image decoder, so there is no library to download. That needs Chrome 80, Edge 80, Safari
16.4 or Firefox 113, plus OffscreenCanvas for the raw bitmaps, which Safari has had since 16.4.
Files up to 30MB and 30 pages, at scales from 0.5× to 4×. Page order comes from the document’s page tree rather than the order the objects sit in the file, so a PDF that has been edited and saved again still comes out in reading order, and a rotated page is drawn the way it is meant to be read.