PNG vs JPEG — picking the right format before converting to PDF
The choice between PNG and JPEG predates PDF embedding by 25 years, but the consequence shows up in PDF size. A 5 MB JPEG becomes a 5 MB PDF; a 50 MB PNG of the same content becomes a 50 MB PDF. Picking the right format first is the highest-leverage size optimization for PDF-of-images workflows.
The fundamental difference
PNG is lossless: every pixel is preserved exactly. JPEG is lossy: small high-frequency details are quantized away.
For photographic content, the lossy quantization is invisible at typical viewing distance — JPEG at quality 85 looks the same as the original to a human eye, while being 5–10× smaller. For non-photographic content (text, diagrams, line art), the same quantization produces visible artifacts: ringing around sharp edges, blocking in flat regions, halos near text.
When PNG is the right call
- Screenshots. UI is full of sharp edges and text. JPEG ruins them. PNG with palette compression is often dramatically smaller than JPEG anyway.
- Logos and brand graphics. Crisp edges, limited colors, often need transparency. PNG-8 with palette is the standard.
- Diagrams, charts, line art. Sharp lines, flat regions. PNG preserves them; JPEG fuzzes them.
- Anything with text rendered as image. Anti-aliased text in JPEG gets visible halos.
- Source files for further editing. Re-saving a JPEG re-quantizes; quality degrades each generation. PNG stays bit-identical across saves.
- Medical, scientific, technical imagery. Where pixel-exact preservation is the point.
When JPEG is the right call
- Photos from cameras and phones. Continuous-tone content compresses well; humans can't see the loss.
- Scanned documents (color or grayscale photos). Acceptable losses, dramatically smaller files.
- Final-distribution content. If the goal is "make the file small for sharing", JPEG wins for photographic content.
- Anything with millions of colors. PNG-truecolor handles them but doesn't compress them well.
Real numbers — same content, both formats
A 1920 × 1080 typical desktop screenshot:
- PNG-8 (indexed, lossless-optimized): ~180 KB.
- PNG-24 (truecolor): ~600 KB.
- JPEG quality 85: ~250 KB. Looks worse — visible halos around text.
- JPEG quality 95: ~500 KB. Halos still visible to a careful eye.
A 1920 × 1080 family photo from a phone:
- PNG-24 (lossless): ~3.5 MB.
- JPEG quality 85: ~280 KB. Visually indistinguishable.
- JPEG quality 95: ~700 KB. Indistinguishable but less efficient.
For the screenshot, PNG is both smaller AND better. For the photo, JPEG is dramatically smaller with no visible quality loss.
Hybrid content — neither format wins cleanly
A scanned document with a photo embedded in the body, or a slide deck with both photos and text annotations, lands awkwardly:
- PNG: large file. The text and edges look perfect; the photo regions are unnecessarily lossless and bloat the file.
- JPEG: smaller file. The photo regions look fine; the text and edges have artifacts.
Two approaches to hybrid content:
- Use one format with smart defaults. JPEG at very high quality (95–98) reduces text artifacts to invisible while still keeping reasonable size for photo regions. The compromise file is 30–40% larger than pure-photo JPEG.
- JBIG2 / "MRC" compression. Mixed Raster Content separates text from photos and compresses each appropriately. Used in document scanners' "fast PDF" output and in commercial PDF compression tools. Not a fit for PNG2PDF — we work on input images, not pre-segmented content.
What PNG2PDF gets as input
Most PNGs uploaded to PNG2PDF are screenshots, logos, exported design assets — content that should be PNG. The tool preserves them losslessly. The resulting PDF is faithful to the input.
If you upload a photo as PNG (because that's what your screenshot tool happened to save it as, or because you exported it from Photoshop without thinking about format), the resulting PDF is unnecessarily large. To shrink it: re-save the image as JPEG at quality ~90 in any photo tool, then upload the JPEG to JPG2PDF instead. The JPEG-based PDF will be 5–10× smaller with no visible quality loss for photographic content.
For archival, prefer PNG
If you're building a PDF that will be the long-term canonical version of an image — archive, legal record, scientific dataset — keep PNG. The size cost is real but small compared to the cost of a generation of JPEG quantization losses you can never recover.
If the PDF is for sharing, viewing, or temporary distribution, JPEG-based for photos and PNG-based for graphics is the right mix.