How PNG transparency behaves in a PDF
Many PNG images have see-through parts: a logo without a background, an icon, a chart exported on a clear background, a cut-out product shot, the soft shadow around a window screenshot. PNG stores this in an extra channel, called alpha, that says for every pixel how opaque it is — fully, not at all, or anywhere in between. This guide is about what PNG to PDF does with that channel, and why the result can surprise you on screen.
The transparency goes into the PDF
A PDF can hold transparency too, as a soft mask: a separate greyscale image stored next to the picture that tells the reader how much of each pixel to show. PNG to PDF writes your PNG’s alpha channel into that mask, 8 bits per pixel. In Chromium-based browsers such as Chrome and Edge, the mask holds the exact values from your file. In Safari, the alpha of greyscale PNGs with transparency and of 16-bit PNGs can differ by 1 level out of 255, which you can’t see. So:
- Fully transparent pixels stay fully transparent.
- Half-transparent pixels — anti-aliased edges, soft shadows, a faded watermark — stay half-transparent.
- Nothing is flattened onto white or black. The picture and its mask are kept apart, just as they are in the PNG.
One small detail: the colour of a half-transparent pixel can differ by at most 1 level out of 255. Browsers handle such pixels in a pre-multiplied form, and the rounding leaves that trace. You won’t see it.
PNGs that mark transparent colours the older way — palette images and colour-key images with a tRNS chunk — open as well.
Why the transparent parts look white
A PDF page is white. When a reader draws your page, it paints the image on top of that white, so wherever the image is transparent you see the page — and the page is white. A logo with a transparent background looks like a logo printed on white paper. A window screenshot’s shadow fades into white instead of into your desktop.
The transparency is still in the file. A reader that shows the page on another colour, or a tool that pulls the image out of the PDF, gets the image together with its mask.
Two things follow from this:
- Light artwork can disappear. A white logo or white text on a transparent background is in the PDF, but on a white page there is nothing to set it apart. If it has to be visible, give it a background before you add it.
- Check the edges of cut-outs. A cut-out that was made against a dark background sometimes has a dark fringe in its half-transparent edge pixels. On a white page that fringe becomes visible. It was in the PNG all along; the PDF only shows it.
Smaller file keeps transparency too
Neither option in Page setup throws the alpha channel away. With Quality first, the image is stored losslessly with its soft mask. With Smaller file, a large image gets a smaller candidate that is still lossless and still carries its soft mask; images of 2000 px or less on the long side are not changed at all. Neither option turns a PNG into a JPEG, a format that has no transparency. PNG quality and PDF size explains when the candidate is used.
Which readers we checked
We made PDFs from transparent test PNGs and opened them in independent PDF engines: Poppler (the engine behind many Linux viewers), Apple’s Core Graphics and PDFKit, PDFium (the engine of Chrome’s built-in viewer) and pdf.js (Firefox’s built-in viewer). Drawn over the white page, every one of them showed the expected result within 1 level out of 255.
That covers how the page looks. How a particular app treats transparency when it prints, edits or converts your PDF depends on that app, and we did not test every one.
How large each image sits on its page, and how much white is left around it, is covered in page size for PNG images.
Make your PDF in the browser → PNG to PDF