Skip to main content

Image to PDF

Convert JPG, PNG, WebP, GIF, and BMP images into print-ready PDF documents locally in your browser with page layout controls, watermarks, compression, and live PDF.js preview.

Image to PDF — Interactive Browser WorkspaceConvert JPG, PNG, WebP, GIF, and BMP images into print-ready PDF documents locally in your browser with page layout controls, watermarks, compression, and live PDF.js preview.
100% Client-Side • Zero Server Upload
Sample Input / Parameters — Corporate Expense Record Pack
4 Receipt images (PNG/JPG), Page Size: A4, Layout: Fit to Page, Quality: Balanced
Ready locally via WebAssembly & JavaScript
Expected Output / Live Result
Expense_Receipts.pdf (4 pages, file size ~280 KB, text and borders sharp)
100% Client-Side • Zero Server Upload

Assembling heterogeneous raster assets into a print-ready document requires more than wrapping raw bytes inside a container. Visual workflows combine camera JPEGs, alpha-enabled PNGs, web-exported WebP files, indexed GIF frames, and uncompressed BMP bitmaps—each with distinct pixel densities and color encodings. NexusCalculator's Image to PDF compiler unifies these sources locally inside your browser using pdf-lib, Web Worker compression, and a live PDF.js preview canvas, outputting ISO 32000-1 documents with zero network transmission.

Raster Normalization and PDF XObject Encoding

While web browsers ship decoders for WebP, GIF, and BMP, the PDF specification natively supports only narrow image stream filters—principally DCTDecode for JPEG bitstreams and FlateDecode for zlib-compressed pixel arrays (embedded PNGs). Injecting raw WebP or BMP bytes directly into a PDF /XObject stream creates an unreadable file.

To bridge that gap cleanly, each queued file runs through a deterministic two-stage normalization pass in browser memory:

  1. Web Worker Resampling: Under High, Balanced, or Compressed, browser-image-compression offloads resizing and bitrate reduction to a background Web Worker, keeping the UI responsive while enforcing pixel and byte caps.
  2. Canvas Transform & Stream Serialization: Each raster paints onto an offscreen HTML5 2D canvas applying user crop bounds (0–100%) and orthogonal rotation (0°, 90°, 180°, 270°). PNG inputs under Original serialize losslessly via pdfDoc.embedPng, whereas other inputs and compressed presets serialize as baseline JPEG streams via pdfDoc.embedJpg.

If your source photographs carry sensitive camera serial numbers, timestamps, or GPS coordinates before normalization, you can inspect or strip them upfront with the Image Metadata Remover.

Page Geometry, PostScript Points, and Scaling Modes

Every PDF page defines a coordinate grid measured in PostScript points (1 pt = 1/72 inch = 0.352778 mm). Standard paper presets map directly to exact ISO 216 and ANSI MediaBox dimensions: A4 (595.28 × 841.89 pt), A3 (841.89 × 1190.55 pt), A5 (419.53 × 595.28 pt), US Letter (612 × 792 pt), and US Legal (612 × 1008 pt). Custom dimensions entered in millimeters convert via mm × 72 / 25.4, while Auto page sizing derives page width and height from rotated image pixels multiplied by 72 / 96 (the standard CSS-pixel-to-point ratio).

Layout Mode Behavior Across Aspect Ratios

Once margins (0 pt, 15 pt, 36 pt, 54 pt, or custom millimeter offsets) carve out the printable client box (clientW × clientH), the engine compares imgAspect = imgW / imgH against clientAspect = clientW / clientH according to your chosen layout mode:

  • Fit: Scales proportionally until the image touches either the horizontal or vertical margin bounds, centering any remaining whitespace with zero cropping or distortion.
  • Fill: Scales proportionally to cover the entire client box edge-to-edge, allowing overhanging edges to bleed past the frame without altering aspect ratio.
  • Stretch: Forces drawW = clientW and drawH = clientH, intentionally warping aspect ratio to eliminate whitespace on fixed-grid layouts.
  • Original: Places the raster at native 72/96 point dimensions centered on the page—ideal for 1:1 UI mockups where scaling introduces resampling softness.
  • Center: Renders at native size when smaller than the client box, automatically falling back to proportional Fit downscaling only if the image overflows page margins.

Supported Image Formats and Compression Presets

Choosing the right quality preset governs both the Web Worker bounding limits and the final PDF stream filter:

Input FormatNative Codec & Bit DepthEmbedded PDF Stream FilterRecommended PresetCompression Target Limits
JPG / JPEGLossy 8-bit DCT (YCbCr)/DCTDecodeBalanced or HighBalanced: ≤ 1.0 MB, 1800 px max, Q 0.70
PNGLossless DEFLATE (RGB/RGBA)/FlateDecode (Original) or /DCTDecodeOriginal (UI/text) or HighOriginal: No downscale, Q 0.95 / lossless PNG
WebPVP8 Lossy / VP8L LosslessNormalized to /DCTDecodeHigh or BalancedHigh: ≤ 3.0 MB, 2500 px max, Q 0.85
GIF8-bit LZW Indexed (256 colors)First frame normalized to /DCTDecodeOriginal or HighPreserves crisp flat graphics at Q 0.85–0.95
BMPUncompressed DIB RGB arrayNormalized to /DCTDecodeBalanced or CompressedCompressed: ≤ 0.3 MB, 1200 px max, Q 0.45

Branded Overlays, Metadata, and Batch Packaging

Beyond raw raster placement, the engine layers true PDF vector objects over every compiled page. Text headers, footers, and dynamic Page X of N counters render using embedded Type 1 StandardFonts.Helvetica vectors so page typography remains crisp at any zoom factor. Watermarks support either rotated vector text (with configurable hex color, point size, opacity, and tilt angle) or uploaded PNG/JPEG brand marks positioned over the page center. For stamping existing PDFs that are already compiled, use the dedicated Watermark PDF tool.

Document properties populated in the Metadata tab populate the PDF Trailer's Document Info Dictionary (/Title, /Author, /Subject, /Keywords), enabling macOS Spotlight, Windows Search, and enterprise DMS crawlers to index the exported file reliably. Switching Compilation Mode from Single to Separate compiles each queued image into an isolated PDF and streams all outputs into a single .zip bundle via JSZip.

Auditing Output PDFs and Avoiding Common Print Pitfalls

Before sending a multi-image PDF to a commercial print shop or archival repository, developers and prepress operators can inspect the exact embedded image resolutions, color spaces, and encoding filters with Poppler's pdfimages and pdfinfo CLI utilities:

# Inspect Document Info metadata and exact MediaBox dimensions
pdfinfo converted-images.pdf

# List every embedded Image XObject, its encoding filter, and effective PPI
pdfimages -list converted-images.pdf

Watch out for three recurring visual pitfalls when assembling mixed-source compilations:

  • Low-PPI Upscaling: Placing a 640 × 480 px web thumbnail onto an A4 sheet in Fit mode stretches it to roughly 60 PPI, yielding visible pixelation in print. Switch to Center or Auto page sizing for small graphics.
  • Mixed Portrait and Landscape Batches: Leaving Orientation locked to Portrait forces wide landscape charts into narrow horizontal bands. Setting Orientation to Auto rotates each page's MediaBox individually to match its image aspect ratio.
  • Oversized Archival Exports: Compiling dozens of 12-megapixel phone images under the Original preset can quickly push file size past 25 MB email attachment caps. Either pick the Balanced preset before compiling or run a secondary optimization pass through Compress PDF.

How to Use Image to PDF

1

Drag and drop JPG, PNG, WebP, GIF, or BMP files onto the upload zone, select them from disk, or paste screenshots directly with Ctrl+V / Cmd+V.

2

Reorder thumbnails by dragging cards across the grid, or use alphabetical and file-size sorting alongside per-image crop, rotate, and duplicate controls.

3

Configure Page Size (A4, A3, A5, Letter, Legal, Auto, or custom mm), Orientation, Layout Mode, and Margins under the General tab.

4

Select a Quality Preset matching your file-size budget and optionally enable running headers, footers, page numbers, or text/logo watermarks.

5

Populate PDF Title, Author, Subject, and Keywords under the Metadata tab, inspect pages in the live PDF.js preview pane, and click Compile & Download.

Real Examples

Corporate Expense Record Pack

Compile several PNG/JPG invoice images into a lightweight A4 PDF for accounting.

Input
4 Receipt images (PNG/JPG), Page Size: A4, Layout: Fit to Page, Quality: Balanced
Output
Expense_Receipts.pdf (4 pages, file size ~280 KB, text and borders sharp)

Art Portfolio Compilation

Bundle high-resolution illustration files into a borderless portfolio PDF.

Input
8 Portfolio illustrations (WebP), Page Size: Letter, Layout: Fill Page, Quality: Original
Output
Art_Portfolio_2026.pdf (8 pages, borderless Letter Landscape layout preserving color profiles)

Frequently Asked Questions

Which raster formats can be combined inside a single PDF compilation?
You can mix JPG, PNG, WebP, GIF, and BMP files in the same queue—including screenshots pasted directly from your system clipboard. During compilation, each raster is normalized onto an HTML5 canvas, rotated or cropped as configured, and embedded as a compliant PDF Image XObject.
How does the Auto page size option translate image pixels into PDF points?
PDF MediaBox dimensions use PostScript points where 72 points equal one inch. In Auto mode, the tool converts each image's post-rotation width and height from standard 96 PPI CSS pixels to PDF points using a 72/96 (0.75) multiplier so each page tightly wraps its source graphic without margins unless specified.
When does a PNG remain lossless instead of being transcoded to JPEG inside the PDF?
When you select the Original quality preset and supply a PNG source, the compiler writes a PNG stream via pdf-lib's embedPng() method using lossless FlateDecode compression. Choosing High, Balanced, or Compressed routes images through Web Worker compression and JPEG DCTDecode encoding to shrink output size.
What is the difference between compiling a single PDF versus separate PDFs?
Single-document mode merges every image in your visual queue into one ordered multi-page PDF file. Separate mode compiles each queued image into its own standalone PDF document with matching page, watermark, and metadata settings, then packages all generated files into a downloadable ZIP archive via JSZip.
Are my uploaded photos or clipboard screenshots ever transmitted to an external server?
No. File decoding, Web Worker image compression, canvas cropping, pdf-lib object serialization, and PDF.js page previews execute entirely inside your browser's local memory sandbox. No raw image bytes or compiled PDFs leave your device.

Key Features

  • Multi-format ingestion supporting JPG, PNG, WebP, GIF, BMP, drag-and-drop uploads, and direct system clipboard pasting
  • Precision MediaBox presets for A3, A4, A5, US Letter, US Legal, Auto pixel-fit, and custom millimeter dimensions
  • Five geometric placement modes (Fit, Fill, Stretch, Original, and Center) with independent portrait, landscape, or auto orientation
  • Web Worker image optimization presets (Original, High, Balanced, Compressed) plus per-image percentage cropping and 90-degree rotation
  • Vector text and PNG/JPEG logo watermarking with configurable color, point size, opacity, angle, headers, footers, and automatic page numbering
  • Custom PDF Document Info Dictionary fields (Title, Author, Subject, Keywords) with live PDF.js canvas preview and single-PDF or ZIP export

Common Use Cases

  • Bundling mixed-format product photography (WebP, PNG, and JPG assets) into a watermarked client proof sheet with custom margins
  • Archiving pasted browser screenshots and bug captures into a paginated QA incident report with running headers and page numbers
  • Converting legacy Windows BMP diagrams and static GIF charts into standardized A4 technical appendices for print distribution
  • Batch-converting a folder of design deliverables into individual standalone PDFs packaged inside a single ZIP archive for client handoff
  • Preparing standardized US Letter or Legal exhibits with embedded Author, Subject, and Keyword metadata for document management indexing
  • Compressing oversized smartphone photos into email-friendly PDF portfolios using Balanced or Compressed Web Worker presets

Explore More Tools in This Category

View All Developer & Utility Tools

PDF to Excel Converter — Extract Tables to XLSX & CSV

Extract tabular data from PDF bank statements, financial reports, and invoices into structured Microsoft Excel (.xlsx) workbooks or RFC 4180 CSV files directly inside your browser.

PDF to PowerPoint Converter — Editable PPTX Presentation Generator

Transform static PDF slide decks and handouts into Microsoft PowerPoint (.pptx) presentations locally in your browser with editable text reconstruction, 2.5x raster fidelity mode, custom branding, and OCR.

PDF to HTML Converter

Convert static PDF documents into clean, semantic HTML5 or coordinate-accurate web markup directly in your browser. Inspect live output inside a sandboxed preview, copy raw code, or download standalone HTML and ZIP archives.

PDF to Text Converter — Clean UTF-8 Plain Text Extractor

Extract clean, reading-order-restored UTF-8 plain text from single or batched PDF files up to 100 MB directly in your browser, complete with live inline editing and zero server uploads.

PDF to PNG Converter

Render PDF pages as lossless, pixel-crisp PNG images with optional alpha transparency directly inside your browser. Scale up to 4x Ultra HD, preview every extracted page, and download single PNGs or a ZIP bundle.

PNG to PDF Converter

Combine up to 50 PNG files into a lossless PDF document or separate zipped PDFs directly in your browser while preserving pixel precision and alpha channel transparency.

Convert HTML to PDF

Professional HTML to PDF converter with a live code editor. Paste your HTML, CSS, and Tailwind code to instantly generate print-ready PDF documents.

Convert Text to PDF

Transform plain text, .txt files, server logs, and code snippets into crisp, searchable vector PDF documents directly inside your browser with custom typography and page controls.