HandyBench

Image to PDF

Turn JPG/PNG images into one PDF.

How to use the Image to PDF

  1. 1 Add one or more JPG or PNG images; they become pages in the order listed.
  2. 2 Drag an image by its ⠿ handle (or use the ↑ and ↓ arrows on a touch screen) to change the order, or ✕ to remove one. Then choose "Fit page to each image", "A4 pages" or "US Letter pages".
  3. 3 Click Create PDF to download images.pdf.

How images become PDF pages

For every image you add, in list order, the tool creates one page and draws the picture on it with pdf-lib. It identifies each file by its first bytes (the PNG or JPEG signature) rather than by its extension or reported type, so a mislabelled or extension-less file still works, and anything that is neither is rejected with its file name. Embedding does not re-encode a JPG; the original compressed data goes into the PDF, so a photo keeps its exact quality and the file grows by about the size of the image. PNGs are stored with their alpha channel, so transparent areas stay transparent on the page.

Only JPG and PNG are accepted. A WebP, HEIC or GIF is rejected with a message naming the file. Convert it first with a tool such as PNG to JPG.

The two page-size options

PDF measures pages in points, where 72 points make an inch. This tool maps one image pixel to one point.

  • Fit page to each image: the page takes the image's pixel dimensions as points, and the image fills it edge to edge with no margin. A 3000 x 4000 pixel phone photo becomes a 3000 x 4000 pt page, which is about 41.7 x 55.6 inches. It looks fine on screen but prints at a huge scale, and pages may vary in size across the document.
  • A4 pages (centered): every page is 595.28 x 841.89 pt (210 x 297 mm).
  • US Letter pages (centered): every page is 612 x 792 pt (8.5 x 11 inches).

In both paper-size modes, a landscape image (wider than tall) gets a landscape page and a portrait or square image gets a portrait page. The image is scaled by the smaller of the width and height ratios, times 0.95, then centered, leaving a margin of about 2.5 percent per side. Small images are enlarged too, not just large ones.

Worked example

The same 3000 x 4000 photo on A4 gets scale min(595.28/3000, 841.89/4000) x 0.95, about 0.1885. It is drawn at 565.5 x 754.0 pt with margins of about 14.9 pt at the sides and 43.9 pt at top and bottom. A 4000 x 3000 landscape photo instead gets an 841.89 x 595.28 pt landscape page and is drawn at 754.0 x 565.5 pt, so it uses the page properly instead of floating in a portrait page.

Common mistakes

  • Wrong page order. Pages follow the order of the list, which starts as the order you added the images. Drag a row by its ⠿ handle to drop it into a new slot, or tap the ↑ and ↓ arrows if you are on a phone or tablet where dragging rows does not work. The ✕ removes an image.
  • Huge output. Since images are not downscaled, a dozen 12-megapixel photos yields a PDF of tens of megabytes. Shrink them first with the image compressor.

To combine the result with other documents, continue to Merge PDF.

Examples

  • ▸ Turning 6 phone photos of a signed form into a single 6-page PDF for an email attachment.
  • ▸ Putting a 3000 x 4000 pixel photo on a standard A4 page, scaled to about 565 x 754 points with margins.
  • ▸ Combining a PNG logo page and two JPG scans into one 3-page document.

Frequently asked questions

Can I control the page size?

There are three options. "Fit page to each image" makes each page as many points as the image has pixels, with no margin. "A4 pages" (595 x 842 pt) and "US Letter pages" (612 x 792 pt) scale each image to fit with a small margin, and landscape images automatically get a landscape page.

Can I combine several images into one PDF?

Yes. Add multiple JPG or PNG images and they become a single multi-page PDF in the order listed. Drag the files into the order you want, or use the up and down arrows next to a file, before creating the PDF.

Why does my WebP, GIF or HEIC image fail?

Only JPG and PNG can be embedded in the PDF directly. Convert other formats to JPG or PNG first, then add them here.

Are images compressed or reduced in quality?

No. JPG data is embedded as it is and PNGs keep their transparency, so quality stays the same, but large photos make a large PDF. Shrink the images first if you need a smaller file.

Are my images uploaded to a server?

No. The PDF is built entirely in your browser, so your images never leave your device.