PDF to JPG: Which DPI and Quality to Choose
ClearConvert turns PDF pages into JPG in your browser. We tested 72, 150 and 300 DPI, three quality levels, file size, fonts and 100 pages.
Short answer: ClearConvert draws each PDF page on a white canvas in your browser and saves it as a JPEG. The pixel size is the page size in points times the DPI divided by 72, so an A4 page is 596 × 842 pixels at 72 DPI, 1241 × 1754 at 150 and 2481 × 3508 at 300. The quality setting matters more than it looks: 85% and 95% store colour at half resolution, while 100% switches to full-resolution colour and matched our lossless reference far more closely, at 1.3 to 2.5 times the size of the 95% file. The JPG does not record its DPI, and PDF text that uses fonts not embedded in the file is drawn with the fonts of your device.
We measured all of this on test pages we generated, not on real documents: a text page, a photo-like page and a scanned-style page. Sizes on your own files will differ, so read the numbers as a guide to the pattern.
What Happens to Each Page
Each page is drawn by pdf.js, an open-source PDF reader, onto a canvas that is filled white first, and the canvas is saved as a JPEG. The pages are done one at a time. One selected page gives a single JPG, and several pages give a ZIP file. Parts of a page that are transparent come out on white: in our test with semi-transparent shapes, the blended colours were within 2 levels of the expected values on a scale of 0 to 255. A page with a rotation comes out in the orientation it is displayed in, with width and height swapped.
Pages keep their own size. In our mixed test at 150 DPI an A4 portrait page came out at 1241 × 1754 pixels, an A4 landscape page at 1754 × 1241, an A3 page at 1754 × 2481 and an A5 page at 875 × 1241. A page can have at most 16,777,216 pixels. In our test, an A0 page of 2383.94 × 3370.39 points (841 × 1189 mm) at 300 DPI was scaled down to 3444 × 4870 pixels.
DPI: Pixels and File Size
DPI only sets how many pixels the page gets. Here are the results for page 1 of each test PDF at quality 95%.
| DPI | A4 pixels | Text page | Photo page | Scanned page |
|---|---|---|---|---|
| 72 | 596 × 842 | 121 KB | 165 KB | 203 KB |
| 150 | 1241 × 1754 | 365 KB | 729 KB | 927 KB |
| 300 | 2481 × 3508 | 997 KB | 2.6 MB | 2.7 MB |
Our text page takes about 40 KB in the PDF, because it holds text and vector shapes, so every JPG is much larger than the page it came from. The photo page and the scanned page each hold one picture of about 2.3 MB and 2.1 MB, and their 300 DPI JPGs came out 1.15 and 1.27 times larger than those pictures.
Printed at A4 size, 150 DPI gives 150 pixels per inch and 300 DPI gives 300. That is simple arithmetic and not a recommendation: the right setting depends on what you will do with the file.
Quality: 85%, 95% and 100%
To compare, we rendered the same page with the same pdf.js build as a lossless PNG and measured how close each JPG is to it with PSNR (peak signal-to-noise ratio), a standard score in decibels. Higher means closer, and two identical images have no finite score. Results at 150 DPI, page 1:
| Quality | Text page size | Text page closeness | Photo page size | Photo page closeness |
|---|---|---|---|---|
| Good (85%) | 275 KB | 40.5 dB | 356 KB | 28.8 dB |
| High (95%) | 365 KB | 44.8 dB | 729 KB | 29.0 dB |
| Maximum (100%) | 492 KB | 64.6 dB | 1.8 MB | 55.6 dB |
The difference between 85% and 95% is small in these tests. The big step is 100%. The first two store colour at half the width and half the height of the brightness detail (4:2:0). Maximum switches to full-resolution colour (4:4:4) and the finest compression setting, which is why it scored so much higher and why the files are bigger: 1.3 times the 95% file for the text page and 2.5 times for the photo page.
Our photo page is synthetic and full of fine noise, which is a hard case for JPEG, so its scores at 85% and 95% say little about real photos. The jump at 100% is the reliable part: both pages moved much closer to the reference.
Will Small Text Stay Readable?
We measured the height of a lowercase letter x in the rendered text, in pixels:
| Text size | 72 DPI | 150 DPI | 300 DPI |
|---|---|---|---|
| 6 pt | 3 px | 7 px | 13 px |
| 10 pt | 5 px | 11 px | 22 px |
| 12 pt | 7 px | 13 px | 26 px |
At 72 DPI a 6 pt letter is only about 3 pixels tall, and the stem of a letter l was a faint grey with a measured ink width of 0.45 of a pixel, never solid black. We did not run text recognition or ask people to read the pages, so these numbers show size only, not readability.
The ZIP File
A ZIP is made when you convert more than one page. The pages are stored in it without compression, because JPEGs hardly shrink. For 3 text pages the ZIP was 1,096,989 bytes against 1,096,619 bytes of JPGs, and for 20 scanned pages it was 2,502 bytes larger than the 18.65 MB of JPGs. To get a smaller ZIP, lower the DPI or the quality. The files inside are named like report-page-001.jpg.
The JPG Does Not Know Its DPI
The header of the JPG says the pixel shape is 1:1 and gives no resolution. It is the same at 72, 150 and 300 DPI, so the setting only changes the number of pixels. A program that needs a print size falls back to its own default, commonly 72 or 96. A 150 DPI A4 page of 1241 × 1754 pixels is 17.2 × 24.4 inches at 72 and 12.9 × 18.3 inches at 96. The JPG has no EXIF block and none of the PDF’s own metadata, but it carries a small generic sRGB colour profile (456 bytes) written by the browser.
Fonts That Are Not in the PDF
Most PDFs embed their fonts, and the archival PDF/A format requires it. A few use the standard fonts such as Helvetica, Times and Courier without embedding them, and then the page is drawn with whatever fonts the device has. In our test every line of text was there, in the right place, but on our Windows PC Courier came out visibly thinner (about 0.81 times the ink of an independent renderer), and the Symbol and ZapfDingbats characters were drawn with different fonts, with the second at 0.71 times the ink. The PDF reader logs a warning for that. If the exact look matters, check that your PDF embeds its fonts. We tested one Windows PC, so we cannot say what other systems substitute.
Speed and Memory
| Test | Pages | DPI | Time | ZIP size |
|---|---|---|---|---|
| Text pages | 100 | 150 | 6.0 s | 36.6 MB |
| Text pages | 100 | 300 | 15.5 s | 99.7 MB |
| Scanned pages | 20 | 150 | 17.2 s | 18.7 MB |
| Scanned pages | 20 | 300 | 21.3 s | 54.6 MB |
The time per page depends on what the page holds: 0.06 seconds for a text page at 150 DPI and 0.86 seconds for a scanned one. The page stayed responsive, with a longest freeze of 87 milliseconds. Memory grows with the total size of the output, because finished JPGs are kept until the ZIP is built. The JavaScript memory we measured reached 47 MB at the 100th text page at 150 DPI and 106 MB at 300 DPI, and about 2 to 2.4 times the ZIP size while the ZIP was built (207 MB for the 300 DPI run). That excludes the rest of the browser.
ClearConvert takes at most 300 pages per run and says “Select at most 300 pages at a time. Use the Pages field.” if you try more. The Pages field takes ranges such as 1-3, 5, 8-; on a 40-page PDF that gave 37 JPGs: pages 1, 2, 3, 5 and 8 to 40. See how to split a PDF for more on page ranges.
What It Does Not Do
- No text in the result. A JPG is a picture, so text, links and form fields cannot be selected or clicked.
- Password-protected PDFs. They have to be unlocked first; ClearConvert shows a message and does not ask for the password.
- No exact print size. The JPG does not carry the DPI.
What We Did Not Test
- Real documents. All our PDFs were generated.
- Text recognition and readability for people.
- Firefox, Safari and phones. The timings are from one PC in one Chromium build.
- What other operating systems use in place of missing fonts.
Try It
To save the pages of your own PDF as images, open PDF to JPG in ClearConvert. The file stays in your browser and is never uploaded. To go the other way and put photos into a PDF, use JPG to PDF and read what changes to your photos. For the rest of the tool, see what ClearConvert is.
Related posts
For questions or inquiries contact us at info@cleartexteditor.com