How each page is built
Every JPG becomes one PDF page. The page uses A4 in the image's own orientation: a landscape image gets an A4 landscape page, and a portrait image gets an A4 portrait page. The image is fitted inside the page with a 24 pt margin and centred; it is never stretched to fill the page.
Before embedding, the image is drawn to a canvas with a long-edge cap of 3000 px and re-encoded as JPEG at quality 0.90. The PDF writer embeds that JPEG with DCTDecode and writes a standard PDF 1.4 file locally. No PDF library or server is involved.
- One selected JPG = one page.
- A4 landscape or portrait follows the image orientation.
- 24 pt margin around the fitted image.
- Long edge capped at 3000 px before embedding.