Convert an image to PDF, privately
Wrap a photo, scan or screenshot into a single-page PDF that fits the image exactly — useful for emailing a receipt, archiving a document scan, or turning a screenshot into a printable file. Everything happens locally, so sensitive documents never leave your device.
How it works
The image is drawn onto a <canvas> and exported as JPEG bytes at your chosen
quality. Those bytes are embedded as a DCTDecode image XObject inside a
minimal, spec-valid PDF assembled by hand: a catalog object, a page object, a
content stream that draws the image, and the image object itself. The page is
sized in points (1/72 inch) from the pixel dimensions divided by the selected
DPI, so the physical size is correct for screen or print. Because JPEG has no
alpha channel, transparent areas are flattened onto white.
Example
A 1500×1000 px photo exported at different DPIs:
| DPI | Page size (points) | Physical size |
|---|---|---|
| 72 | 1500 × 1000 | 20.8 × 13.9 in (screen) |
| 150 | 720 × 480 | 10 × 6.67 in |
| 300 | 360 × 240 | 5 × 3.33 in (print) |
The PDF is built entirely in your browser — the image is exported from a
<canvas> and embedded directly into a minimal, valid PDF — so your file is
never uploaded.