Rendering a PDF to Images, Explained
After reading this you will understand what "rendering" a PDF page actually does, how DPI turns into pixel counts, and how to pick a resolution and format that give you sharp images without wasting megabytes.
What rendering a PDF page means
A PDF is a set of drawing instructions, not a picture. A page might say "draw this Helvetica text at 12 points here", "fill this rectangle with 30% gray", "place this embedded JPEG in that box". Nothing in the file is a grid of pixels until something reads those instructions and paints them onto a canvas. That painting step is called rendering.
This tool renders each page with pdf.js, the same engine Firefox uses to display PDFs. It reads the drawing instructions, rasterizes them at the resolution you choose, and hands you a PNG or JPEG per page. You can download pages one at a time or grab all of them in a single ZIP.
Here is the hook: take a one-page invoice that is 8.5 by 11 inches. At 150 DPI it becomes a 1275 × 1650 pixel image. At 300 DPI the same page becomes 2550 × 3300 pixels, four times as many pixels, and roughly four times the file size. The page did not change. Only the density of the sampling grid changed.
When to use it, and when not to
Rasterizing is the right move when the destination expects an image and not a document. Common cases: dropping a page into a slide deck, posting a preview thumbnail, feeding a page to an OCR tool that wants a bitmap, or sending someone a page they cannot accidentally edit or re-flow.
Rasterizing is the wrong move when you still want text. The moment a page becomes a PNG, the words stop being selectable, searchable, and copyable. Font hinting is baked in. A screen reader sees nothing but pixels. If your goal is to reorganize or trim a document while keeping it a document, use a PDF-native operation instead.
Do not rasterize a text PDF just to email it "so it cannot be changed". You throw away every searchable word and usually make the file larger. If you want to remove editable structure, flatten the PDF or strip its metadata instead.
The formula: DPI to pixels
PDF page sizes are measured in points, where 72 points equal one inch. A US Letter page is 612 by 792 points, which is exactly 8.5 by 11 inches. To turn a physical size into a pixel count, multiply inches by the dots per inch you asked for.
Here W_{px} and H_{px} are the output width and height in pixels, \text{width}_{in} and \text{height}_{in} are the page size in inches, and DPI is the dots-per-inch you set. Because the page has two dimensions, the total pixel count grows with the square of DPI.
The squared term is the key intuition. Doubling DPI from 150 to 300 does not double the work, it quadruples it. A US Letter page holds 1275 \times 1650 \approx 2.1 million pixels at 150 DPI, and 2550 \times 3300 \approx 8.4 million pixels at 300 DPI. That 4x ratio drives both memory use and file size.
A worked example with the default settings
The demo button uses the tool defaults: PNG output at 150 DPI. Suppose you feed it a two-page US Letter PDF.
Two US Letter pages at 150 DPI, PNG
- Read the page size. US Letter is 612 by 792 points. Divide by 72:
8.5by11inches. - Apply the DPI. Width: 8.5 \times 150 = 1275 pixels. Height: 11 \times 150 = 1650 pixels.
- Count pixels per page: 1275 \times 1650 = 2{,}103{,}750 pixels, about 2.1 megapixels.
- Estimate PNG size. PNG is lossless and compresses flat regions well. A text-heavy page at this resolution typically lands around 150 to 400 KB. A page full of photos compresses poorly and can exceed 2 MB.
- Multiply by page count. Two pages give two PNG files. Downloaded together, they arrive as one ZIP.
Switch the format to JPEG at quality 0.8 and the same text page might drop to 80 to 150 KB, but sharp black text on white gains faint ringing artifacts around the letters. That trade-off is the whole PNG-versus-JPEG decision, covered next.
PNG or JPEG: choosing the format
PNG is lossless. Every pixel comes back exactly as rendered, and it handles sharp edges and large flat areas cleanly. That makes it the right choice for text, line art, screenshots, and anything with crisp boundaries. The cost is size on photographic content, where PNG cannot discard detail.
JPEG is lossy. It divides the image into 8 by 8 blocks and throws away high-frequency detail the eye barely notices. That is excellent for photographs and terrible for text, because letters are all high-frequency edges. At quality 0.8 you save space; at quality 0.5 you save more but see visible blocking.
| Page content | PNG | JPEG q0.8 | JPEG q0.5 |
|---|---|---|---|
| Mostly text | 250 KB | 120 KB | 70 KB |
| Text plus one photo | 900 KB | 220 KB | 110 KB |
| Full-page photo | 2.3 MB | 380 KB | 160 KB |
A simple rule: if the page is mostly words or diagrams, use PNG. If it is mostly a photograph and size matters, use JPEG at 0.8 or higher.
Explore the DPI and format trade-off
Common mistakes
The most frequent error is cranking DPI up "to be safe". At 600 DPI a US Letter page is 5100 \times 6600 \approx 33.7 megapixels. A 50-page document becomes 50 images each larger than most camera photos, and the ZIP can pass 200 MB. Screens display around 96 to 150 DPI, so anything beyond 150 for on-screen use is invisible detail you still have to store and send.
The second mistake is JPEG for text. Zoom into a JPEG-encoded page of small type and you see gray halos around each glyph. OCR accuracy drops with those artifacts. For OCR, render PNG at 300 DPI so the recognizer sees clean, high-contrast edges.
A third pitfall is assuming every page is US Letter. A4 is 595 by 842 points, which is 8.27 by 11.69 inches, so an A4 page at 150 DPI is 1240 × 1754 pixels, not 1275 × 1650. Check the actual page size before predicting pixel counts. A landscape or oversized page changes the numbers again.
Finally, remember that rasterizing discards text. Once you have PNGs, there is no reliable way to get the original selectable words back short of OCR, which reconstructs an approximation. Keep the source PDF.
Related tools
Rendering to images is one step in a larger workflow. These tools handle the document side:
- To go the other direction and bundle images back into a document, use Images → PDF.
- To pull specific pages before rendering them, use the PDF Page Extractor, or split a file with the PDF Splitter.
- To combine several PDFs first, use the PDF Merger.
- To fix sideways pages before rasterizing, use the PDF Rotator.
- If your real goal is a smaller PDF rather than images, try the PDF Compressor.
- To check what hidden information a file carries, use the PDF Metadata Viewer & Stripper.
Frequently asked questions
What DPI should I use?
Use 150 DPI for screens and slides. Use 300 DPI when the images will be printed or fed to OCR. Going above 300 rarely helps and multiplies file size: 600 DPI is four times the pixels of 300.
Why are my JPEG pages fuzzy around the text?
JPEG compresses in 8 by 8 blocks and discards high-frequency detail. Text is nothing but high-frequency edges, so it gains gray halos. Use PNG for any page with type or line art.
Can I get the text back after converting to images?
Not directly. Rendering bakes the words into pixels. You can run OCR on the images to recover an approximation of the text, but it will not be identical to the original. Keep the source PDF if you need the text.
Does converting happen on a server?
No. The whole process runs in your browser with pdf.js. Your files never leave your device, which matters when the PDF holds contracts, medical records, or anything private.
Why is my ZIP so large?
Usually DPI is too high, the format is PNG on photo-heavy pages, or both. Drop to 150 DPI for screen use, or switch photo pages to JPEG at quality 0.8. A 50-page document at 600 DPI PNG can easily exceed 150 MB.