Skip to main content
HerePDF

Guide

Turning PDF Pages into Images and Back Again: What You Lose

By Happy Turtle Tech ยท Published

Exporting each page of a PDF as an image and then building a new PDF from those images is a common workaround. It solves a few problems and creates others, so we measured what it does. We took 50 real documents from a fixed sample of 2009-era US government PDFs, ran each through HerePDF's PDF to image and image to PDF tools as PNG and as JPEG at three resolutions, and recorded what came back. This page reports what we found, with the method and the limits at the end.

What the trip does

A page rendered to an image is a grid of pixels. Everything on it - text, lines, logos - has become part of the picture. Turning the images back into a PDF wraps each picture in a page. The result looks like the original but is structurally a different thing: a scan-like file.

That is the big cost. There is no text layer any more. You cannot search it, select it, or copy from it, a screen reader has nothing to read, and the extract text tool will report every page as having no extractable text. Scanned vs text-based PDFs explains why this changes what any tool can do with the file afterwards.

What we measured

Documents with a text layer (30 files). Each row is one setting; the sizes are the typical (median) file before and after.

SettingTypical file, before and afterTimes bigger: typical / 90th percentileCame back smallerPage width
JPEG at 72 DPI43 KB to 369 KB6.8 times / 15 times1 of 301.0 times the original
JPEG at 150 DPI43 KB to 1.1 MB23 times / 48 times0 of 302.1 times the original
JPEG at 300 DPI43 KB to 3.0 MB59 times / 122 times0 of 304.2 times the original
PNG at 72 DPI43 KB to 205 KB4.7 times / 8.7 times2 of 301.0 times the original
PNG at 150 DPI43 KB to 663 KB12 times / 28 times0 of 302.1 times the original
PNG at 300 DPI43 KB to 1.6 MB29 times / 68 times0 of 304.2 times the original

Documents with no text layer on their first page (20 files, the kind a scan usually is).

SettingTypical file, before and afterTimes bigger: typical / 90th percentileCame back smallerPage width
JPEG at 72 DPI121 KB to 251 KB2.1 times / 2.9 times2 of 201.0 times the original
JPEG at 150 DPI121 KB to 825 KB7.0 times / 8.6 times0 of 202.1 times the original
JPEG at 300 DPI122 KB to 2.4 MB20 times / 23 times0 of 194.2 times the original
PNG at 72 DPI121 KB to 314 KB2.0 times / 2.7 times1 of 201.0 times the original
PNG at 150 DPI121 KB to 294 KB2.9 times / 4.9 times0 of 202.1 times the original
PNG at 300 DPI122 KB to 420 KB3.4 times / 7.0 times0 of 194.2 times the original

Across the 180 round trips of a document that had text, 0 came back with any extractable text. Every round trip that completed kept the page count. The page size did change, though: pages are sized one point per pixel, so they come back larger (see below).

It does not make the file smaller

The rebuilt file was smaller than the original in only 6 of 298 completed round trips, and all of those were at the lowest resolution. A text-based PDF is a few kilobytes of drawing instructions; as pictures it becomes much larger, and the higher the resolution the larger it gets. The files with no text layer on their first page fared no better: the typical file grew at every setting. If you are trying to get under a size limit, compress is the tool, and PDF too big to email? and why your PDF is so large explain what actually works.

PNG or JPEG

For documents with a text layer, PNG came out smaller than JPEG at every resolution: at 300 DPI the typical file was 1.6 MB as PNG and 3.0 MB as JPEG, and at 150 DPI 663 KB against 1.1 MB. These are pages of mostly flat white with sharp text, which suits PNG's lossless compression, and the JPEG that HerePDF writes is saved at quality 0.92. For the files with no text layer the gap opened the same way at the higher resolutions: 420 KB as PNG against 2.4 MB as JPEG at 300 DPI.

We measured size, text and page size. We did not measure photographs, and we did not measure how sharp the result looks, so nothing here argues against the usual advice that JPEG suits photographs. PNG or JPEG? Choosing a format and DPI covers how to choose, and what DPI means.

When it is worth it

The round trip earns its place in a few situations: a page that shows wrong fonts or missing elements in some viewers, where a picture of the correct rendering is what you need; and a page you want to be a fixed picture rather than editable text. Shrinking the file is not one of them, as the numbers above show.

That last case is the idea behind HerePDF's redact tool, which does it selectively, only on the pages you mark, and paints the black boxes into the image before the page is rebuilt. If your aim is to remove sensitive content, use that rather than converting the whole file yourself.

Doing it with HerePDF

Export with the PDF to image tool, then combine with the image to PDF tool, putting the images in page order before building. The image to PDF tool strips EXIF data from JPEGs as it embeds them. Both steps run locally in your browser, so the document stays on your device throughout.

What stays the same, and what does not

The visual appearance survives well if you export at a high enough resolution, and page order and count survive if you keep the images in order (every completed round trip here kept the count). Everything else - text, links, bookmarks, form fields, comments and document properties - does not come through the images, because images do not carry any of them. If a link or bookmark matters, the round trip breaks it, and you would have to rebuild it in another program.

Page size after the trip

An image has pixel dimensions rather than physical ones, and the image to PDF tool sizes each page to match its image, one point (1/72 of an inch) per pixel. So pages come back larger than they went in: the typical page was 2.1 times as wide at 150 DPI and 4.2 times as wide at 300 DPI. It looks the same on screen, but it will not print at its original paper size. Before you send or print it, use the resize tool to scale the pages back to a paper size. PDF page sizes explained covers why pages come out at the wrong scale and how the resize tool corrects it.

Alternatives worth considering

If you only want a picture of one page - for a slide, a message or a web page - export that page alone and skip the second half. If you need to alter content, editing the original source and exporting again beats any amount of round-tripping.

Keep the original

Always keep the source PDF. The round trip cannot be undone, because the text layer and the original structure cannot be recovered from the pictures.

How we measured, and what this does not show

The files come from the same fixed GovDocs1 collection of 2009-era US government PDFs as our redaction and metadata studies. The sample rule, fixed before any result was seen, was: of the files with at most 5 pages and at most 2 MB, the 30 with a text layer on page 1 and the 20 without one that have the lowest SHA-256 of their thread/name. There is no choice of file to tune. Each went through PDF to image (as PNG and as JPEG at 72, 150 and 300 DPI, using the tool's own Download All as ZIP) and then image to PDF, in Chromium against the built site, once per setting. We recorded file size, page count, the width of page 1 and how many characters of text a reader could extract.

The limits are real. These are old government documents, not yours; the sizes depend on what the original contains. We did not test photographs or measure sharpness. The tool refused 2 round trips because the page was too large to draw at 300 DPI; those are counted as not completed, not as a result. The file names are not published, only the counts, and the data and the method are there to check against.

Frequently asked questions

Can I search or copy text after converting pages to images and back?

No. Once pages are images, the text is pixels. In our test, 0 of 180 round trips of a document that had text came back with any text a reader could extract, and the extract text tool reports such pages as having no extractable text.

Does converting to images and back make the file smaller?

Usually not. In our test the rebuilt file was smaller than the original in 6 of 298 round trips, all of them at the lowest resolution. For most files it was several times larger, and the higher the resolution the larger it got.

Is PNG or JPEG smaller for a PDF made of text pages?

In our test, PNG. For documents with a text layer, the JPEG round trip came out larger than the PNG one at every resolution we tried (the tool saves JPEG at quality 0.92). We did not test photographs, where the usual advice is the other way round.

Is there any benefit to the round trip?

It turns each page into a fixed picture, which can fix a page that renders differently in different viewers, and it removes live text from a page. It does not shrink a file, and it cannot be undone.