Why JPEG embeds so cleanly into PDF
PDF's image XObject spec supports a /Filter /DCTDecode entry, which means the object's stream can literally be the raw bytes of a baseline JPEG file. A PDF viewer just hands those bytes to its JPEG decoder. That's the entire trick behind this tool — no image library, no server round-trip, just a JPEG byte stream wrapped in a few hundred bytes of PDF structure (a Catalog, a Pages tree, one Page + one image XObject + one content stream per image, and a cross-reference table).