How the conversion runs
Each picture is loaded into an <img> element, scaled so its longest edge is at most 1800 pixels, drawn onto a canvas and converted to a data URL. The pdf-lib engine then embeds it — embedPng() for PNG files, embedJpg() for everything else — and adds one page per image sized exactly to the canvas pixels, meaning one pixel becomes one PDF point (1/72 inch). A 1600 × 900 screenshot therefore lands on a 22 × 12.5 inch page, which is large on paper but pixel-perfect on screen. Images are converted in the order you added them and arrive as a single multi-page file called images.pdf. PNG keeps its transparency; JPEG and WebP are re-encoded as JPEG at quality 0.92 because that is the only raster format pdf-lib can embed besides PNG.
Edge cases and hard limits
Accepted inputs are PNG, JPEG and WebP only — SVG, GIF, HEIC and TIFF are filtered out before the run. Anything longer than 1800 pixels on its long edge is downscaled, so a 4000-pixel photo loses resolution and its PDF is roughly a quarter of the original pixel dimensions. Transparency survives only as PNG: a WebP or JPEG with an alpha channel is flattened onto white. There is no page size, margin, DPI, orientation or compression control, no EXIF-aware cropping beyond what the browser does when decoding, and no per-file size limit — a batch of fifty 12-megapixel photos is processed in memory, so a phone browser may run out of headroom before the file is written.
Privacy: processed in your browser
The pictures are decoded by your own browser and assembled into a PDF in this tab; no image data is sent anywhere, because there is no endpoint to send it to. Only the pdf-lib library is downloaded once on first use, and the page keeps working offline afterwards.
Frequently asked questions
Why is the PDF page so big — can I make it A4?
The page is created at the image's pixel size, so one pixel equals one point: a 1600-pixel-wide photo becomes a 22-inch page. There is no page-size option, so print with “fit to page” in your PDF viewer, or resize the images first if you need true A4 output.
Will transparency be preserved?
Only for PNG files, which are embedded as PNG. JPEG cannot store an alpha channel and WebP is converted to JPEG here, so a transparent WebP or JPEG appears on a white background.
Why did my 12-megapixel photo get smaller?
The longest edge is capped at 1800 pixels before embedding, which keeps the PDF and the memory footprint manageable. A 4000 × 3000 photo is therefore stored at 1800 × 1350, which is still around 200 DPI at A4 size but is not the original resolution.