Choosing an image format for a PDF
Turning pictures into a PDF looks like it should be format-agnostic, and it is not. The document format itself can only carry certain kinds of image, which decides whether your files go in exactly as they are or are rebuilt on the way — and that decides both the quality and the size of what comes out.
A PDF can only carry two kinds of image
The PDF format dates from 1993 and carries JPEG data natively, along with a handful of raw pixel encodings that PNG maps onto. That is the whole list. WebP did not exist until 2010, AVIF is more recent still, and neither can be put into a PDF as it stands.
This is why so many converters simply refuse those formats, and why searching for a way to convert one usually turns up a two-step suggestion involving another tool first.
A converter that does accept them is decoding each image and re-encoding it into something the PDF can hold. That works, and it has consequences worth knowing before you rely on it.
What survives untouched, and what gets rebuilt
A JPEG goes into a PDF byte for byte. Nothing is decoded and nothing is compressed a second time, so there is no additional generation loss — the photograph in the document is the photograph you had.
A PNG is embedded directly too, and PNG is lossless, so nothing is lost there either.
Anything else has to be decoded to pixels and re-encoded. Done properly that is lossless as well: the pixels are the pixels. What changes is the size, and it usually changes upwards, because the re-encoding target is PNG and PNG compresses photographs far less efficiently than WebP or AVIF do. A document built from twenty WebP photographs can be several times the size of the twenty files that went into it.
Choosing for the content, not out of habit
For photographs and scans, JPEG is the right choice and it is not close. Photographic detail has no hard edges for lossless compression to exploit, so PNG stores it at many times the size for no visible gain.
For screenshots, diagrams, charts and anything containing text or thin lines, PNG is the right choice. JPEG's compression clusters artefacts around sharp edges, which is where all the information in a screenshot lives — the result is a soft halo around every letter and rule.
The mistake to avoid is a screenshot saved as a JPEG. The damage is done before conversion and no tool can undo it, because the detail is already gone.
If the result is too large
Compress the finished document rather than the pictures. A PDF compressor works on the images inside it with knowledge of how they are used, and it can be given a target that suits reading on screen rather than printing.
Consider the resolution as well. A phone photograph is far more detail than a page ever needs, and a document that will only be read on screen gains nothing from thirty megapixels per page beyond size.
One thing not to do is convert a photograph to PNG in the hope of improving it. Lossless storage of an already-lossy image preserves the compression artefacts perfectly and makes the file much larger.
The mistake that costs the most
Putting a screenshot into a PDF as a JPEG. Screenshots are full of sharp edges — text, window borders, thin lines — and JPEG compression works by discarding exactly the fine detail those consist of. The result is the halo of grey speckle around every letter that makes a screenshot look degraded, and it cannot be undone.
The reverse mistake is cheaper but still worth avoiding: a photograph stored as PNG. PNG stores every pixel exactly, and a photograph has no large areas of flat colour to compress, so the file is often five to ten times larger than the JPEG would be for no visible gain.
The rule that covers almost every case: if the image came from a camera, JPEG. If it came from a screen, PNG.