What is Image to PDF?
Combining multiple photos, scans, or receipts into a single PDF document shouldn't require installing bulky software or uploading private documents to the cloud. Our tool sequences your images and wraps them in a PDF container locally using jsPDF, ensuring perfect privacy and instant processing.
A note about file privacy
Image to PDF is built to handle your file entirely in the browser. You can confirm the data path in DevTools: during processing, your file should not show up as a network upload request. For the broader risks of fake or untrusted converters, see theFBI Internet Crime Complaint Center warning.
Treat Image to PDF like a small desktop utility, not an upload service. Your browser may fetch the code needed to do the work, but the selected file stays in local memory while it is processed. That is why the Network panel is worth checking whenever the file is confidential.
- Before processing: strip metadata, comments, and form fields you would not want shared, since these can carry author names, paths, and internal notes into the output.
- While processing: watch the Network tab. A library download is expected; a request carrying your file bytes is an upload.
- After downloading: scan unfamiliar results before opening them. A file that looks converted can still be malicious.
Supporting guidance: Malwarebytes on malicious converters andKaspersky's safe conversion guidance.
Deep Dive: Image to PDF
Related Articles
Learn more about this tool and related topics in our blog.
How to Edit, Merge & Compress PDFs Without Uploading Them
Stop risking your data with server-side document tools. Learn how to manage, merge, and edit PDFs entirely in your browser for maximum security.
The Complete Guide to Web Image Optimization
Everything you need to know about optimizing images for the modern web. Boost your SEO and user experience with faster load times.
“For any photo with personal value, the safest conversion is the one where the file remains locally on the device. Browser side building with pdf-lib removes the server copy that cloud tools must keep, even for a couple of hours, and that single change clears most of the GDPR transfer and retention questions at once. Photos often reveal more than people expect, which is exactly why keeping them local matters.”
Azeem Mustafa
Privacy Architect
Core Capabilities
- Simple drag-and-drop page reordering
- Supports JPG, PNG, and WebP formats
- Standard page sizes: A4, Letter, and Legal
- Custom margin controls (None, Small, or Big)
- Per-page rotation to fix sideways scans
- Clean, watermark-free PDF exports
- locally processed and private and runs entirely offline
Why It Matters
- Organization: Share one document instead of many image attachments.
- Control: Reorder and rotate pages before export.
- Privacy: Keep sensitive images on-device during conversion.
- Compatibility: Generate a widely supported PDF output format.
Quick Start Guide
Add your images: Select the JPG, PNG, or WebP files you want to combine. You can grab them from your device or drag them right in.
Fix the order: Drag and drop the thumbnails to get your pages in the exact sequence you need.
Rotate & Align: Use the rotate buttons to fix any sideways or upside-down images before you export.
Pick your layout: Choose your page size (A4, Letter, etc.) and decide if you want margins or a borderless look.
Download your PDF: Hit "Save PDF" and you’ve got a clean, combined document ready for sharing.
Usage Examples
Turn three JPEGs into one A4 PDF
Scenario 01Each photo becomes its own page, fit so the whole picture shows.
const pdfDoc = await PDFDocument.create();
for (const file of jpegFiles) {
const bytes = await file.arrayBuffer();
const jpg = await pdfDoc.embedJpg(bytes);
const page = pdfDoc.addPage([595, 842]); // A4 in points
const { width, height } = jpg.scale(1);
const scale = Math.min(
(page.getWidth() - 48) / width,
(page.getHeight() - 48) / height
);
page.drawImage(jpg, {
x: 24, y: 24,
width: width * scale,
height: height * scale,
});
}
const pdfBytes = await pdfDoc.save();One PDF with 3 pages. Each JPEG stored as a DCTDecode image XObject. File stays in browser memory, no upload.
Fit a photo onto Letter without cropping
Scenario 02Scale the image to the smaller of the two fit ratios so the margins stay equal.
const page = pdfDoc.addPage([612, 792]); // US Letter
const margin = 36;
const fit = Math.min(
(page.getWidth() - margin * 2) / img.width,
(page.getHeight() - margin * 2) / img.height
);
page.drawImage(img, {
x: margin,
y: page.getHeight() - margin - img.height * fit,
width: img.width * fit,
height: img.height * fit,
});Whole photo visible with a 36 point border. Aspect ratio preserved, nothing stretched.
Mix a PNG and a JPEG in one document
Scenario 03pdf-lib picks the right filter per file: PNG uses FlateDecode, JPEG uses DCTDecode.
const png = await pdfDoc.embedPng(pngBytes); // FlateDecode + SMask
const jpg = await pdfDoc.embedJpg(jpgBytes); // DCTDecode
const p1 = pdfDoc.addPage([595, 842]);
const p2 = pdfDoc.addPage([595, 842]);
p1.drawImage(png, { x: 0, y: 0, width: 595, height: 842 });
p2.drawImage(jpg, { x: 0, y: 0, width: 595, height: 842 });Two pages, mixed formats. PNG transparency kept via soft mask. Single PDF saved locally.
Common Scenarios
Scanned documents and forms
Join several scanned pages into one PDF you can email or archive.
Photo portfolios
Send a set of shots as a single file instead of a pile of attachments.
Receipts and expense claims
Group a month of receipts into one document for reimbursement.
Family photo albums
Build a printable album from a holiday or event without extra software.
Reports and assignments
Attach charts and screenshots as PDF pages inside a written report.
Tickets and travel papers
Keep boarding passes and booking screenshots in one place.
Invoices and statements
Turn saved invoice images into a single record for your accounts.
Slide and presentation handouts
Convert slide images into a PDF handout for printing.
Questions?
Technical Architecture
Image XObjects in the PDF
Each picture is added as an image XObject, a resource the page references and draws with drawImage. The page keeps one copy of the object, which is why repeated images stay small. pdf-lib exposes this through embedJpg, embedPng, and the generic embedImage.
JPEG uses DCTDecode, PNG uses FlateDecode
A JPEG is stored inside the PDF with the DCTDecode filter, which is the JPEG compression itself, so quality is kept and the bytes are not re encoded. A PNG is stored with FlateDecode (zlib), and its transparency is carried in a separate soft mask, the SMask. This is why a transparent PNG keeps its see through areas.
Page geometry and the MediaBox
Page size lives in the MediaBox of each page dictionary, in points where one point is 1/72 of an inch. A4 is 595 by 842 points and US Letter is 612 by 792 points. Because points are resolution independent, the same file prints sharp at 72 DPI or 300 DPI.
Fit math keeps the aspect ratio
To fit a photo without cropping, the tool scales by the smaller of the two ratios: width available divided by image width, and height available divided by image height. That single number is applied to both axes, so the picture is never stretched out of shape.
Local only by design
Your images are read with the browser File API into memory. The PDF is built there with pdf-lib and returned as a download Blob. No bytes travel to a server, so there is no upload copy to delete and no cross border transfer to review under GDPR.
Built on the ISO 32000 standard
PDF is defined by ISO 32000, currently PDF 2.0. The PDF Association publishes the specification archive the format is built on. FileMint produces ordinary PDFs that follow this standard, so they open in any reader.
Points are the native PDF unit, where one point equals 1/72 of an inch. Values match the ISO 32000 standard.
| Feature | ★ RecommendedWidth (pt) | Height (pt) | Common use |
|---|---|---|---|
| A4 portrait | 595 | 842 | Worldwide documents |
| US Letter portrait | 612 | 792 | US and Canada |
| A4 landscape | 842 | 595 | Wide scans, albums |
| Letter landscape | 792 | 612 | US wide layouts |
| Custom size (points) | custom | custom | Bespoke print |
Choosing the right layout for your photos
The first choice is page size. A4 is the worldwide default at 595 by 842 points, while US Letter is 612 by 792 points and is the norm in the United States and Canada. The gap is small, 17 points in width and 50 in height, but a tightly laid out page can spill onto a second sheet or gain a blank strip if you pick the wrong one. When the file will be printed, match the paper tray you plan to use.
The second choice is fit versus stretch. Fit keeps the aspect ratio, so a square photo on a tall page shows fully with side margins. Stretch fills the page but can make people look wider or taller than they are. For most personal photos, fit is the safer pick. Landscape photos often look best on a landscape page, which simply swaps the width and height of the MediaBox.
Keeping your photos on your device
Cloud tools ask you to upload first. iLovePDF says it deletes files within two hours, and that is a reasonable policy, but the pictures still travel through its servers. With FileMint the bytes never leave your machine, so there is no copy to delete and no transfer to review under GDPR. This matters most for photos that show faces, documents, or health related scenes, since those can fall under GDPR Article 9, the rule on special category data.
The PDF format itself is an open standard under ISO 32000, and the pdf-lib librarywe use is open source. You can read the code and confirm the local only path for yourself. For the deeper privacy background, the ISO 32000 standard pageand the iLovePDF privacy policyare worth a read.
Where this tool fits in your workflow
Turning images into a PDF is one step. After you have the file, you may want to shrink it for email, pull a page back out as an image, or build a PDF from text instead. All of these run locally here too:
- Image to PDF to make this file from your photos.
- Compress PDF to shrink a large result for email or upload.
- PDF to Image to pull a page back out as a picture.
- Text to PDF to build a document from words instead of photos.
- HEIC to JPG to get iPhone photos ready before converting.
For background on staying private while you work, read our guides on the best image formats for the web in 2026 and how client side processing protects your privacy. The GDPR text on document handling is worth reading at the GDPR portal.
Keep Exploring
Power up your workflow with related utilities.
Related Tools
PDF Merge
Upload multiple PDF files, drag to reorder, and merge into one downloadable PDF. Completely free with zero server dependency and no file size limits.
Use free →PDF Split
Upload a PDF, specify page ranges like 1-3,5, and download a new PDF containing only those pages or individual page files.
Use free →Image Compressor
Compress your images locally in your browser. Reduce file sizes for JPG, PNG, and WebP images without noticeable quality loss.
Use free →Related Articles
Learn more about this tool and related topics in our blog.
How to Edit, Merge & Compress PDFs Without Uploading Them
Stop risking your data with server-side document tools. Learn how to manage, merge, and edit PDFs entirely in your browser for maximum security.
The Complete Guide to Web Image Optimization
Everything you need to know about optimizing images for the modern web. Boost your SEO and user experience with faster load times.
Founder & Lead Developer at FileMint
Building privacy-first browser tools powered by WebAssembly. Focused on making file processing fast, secure, and accessible — without ever uploading your data to a server.
View full profile →