Skip to content
DevToolKit

Rasterize PDF

Rasterize PDF pages to image-based content at custom DPI. Flatten vector text, fonts, and graphics into pixel data for secure distribution, print proofing, and redaction locking.

pdf

Drop your PDF here, or click to browse

Files are processed entirely in your browser — never uploaded

Processed locally
Was this tool helpful?

How to Use

Rasterize your PDF in four steps:

  1. Upload your PDF — Drag and drop the file or click the dropzone to browse. The tool loads the document locally and displays the page count and file size. No data leaves your device.
  2. Choose resolution and format — Select a DPI level: 72 for lightweight screen viewing, 150 for general-purpose output, or 300 for print-quality fidelity. Pick JPEG for smaller files or PNG for lossless quality. When using JPEG, adjust the quality slider between 50% and 100%.
  3. Click "Rasterize" — The tool renders each page to a canvas at the chosen resolution, exports it as an image, and assembles the images into a new PDF. A progress indicator shows which page is being processed.
  4. Download the result — Once complete, review the output file size and size change, then click download. The rasterized PDF contains one full-page image per page with the same page dimensions as the original.

The entire pipeline runs in your browser using PDF.js for rendering and pdf-lib for output assembly. Your PDF is never uploaded to any server, making this tool safe for confidential documents such as contracts, legal filings, financial statements, and medical records.

About This Tool

Rasterization is the process of converting vector-based page descriptions into pixel grids. A PDF page is defined by a sequence of drawing operators — text-showing operators place glyphs using font programs, path operators define Bezier curves and straight lines, and image operators paint raster data with color space transformations. When you rasterize a PDF, a rendering engine executes every operator on a virtual canvas at the specified resolution, producing a bitmap image that captures the exact visual appearance of the page.

The key parameter is resolution, measured in dots per inch (DPI). PDF content is defined in a coordinate system of 72 units per inch (called "points"), so a scale factor of DPI / 72 converts point dimensions to pixel dimensions. A US Letter page (8.5 x 11 inches) renders to 612 x 792 pixels at 72 DPI, 1275 x 1650 pixels at 150 DPI, and 2550 x 3300 pixels at 300 DPI. The memory required for a single page canvas scales quadratically: 300 DPI uses approximately 4x the memory of 150 DPI. This tool processes pages sequentially, releasing each canvas after export, to keep peak memory usage manageable even for large documents.

After rendering, the pixel data is encoded into either JPEG or PNG format. JPEG uses lossy DCT-based compression that achieves high compression ratios (typically 10:1 to 20:1) at the cost of introducing subtle artifacts around sharp edges — a visible trade-off on text-heavy pages at quality levels below 80%. PNG uses lossless DEFLATE compression that preserves every pixel exactly but produces larger files, typically 2-5x the size of equivalent JPEG output. The encoded image is then embedded into a new PDF page using pdf-lib's embedJpg() or embedPng() methods, which store the compressed image data as an XObject stream in the PDF's internal structure.

The output PDF preserves the original page dimensions in points. Each page contains a single image drawn from corner to corner, so the document looks identical when viewed at 100% zoom. However, the underlying content is fundamentally different: there is no text that can be selected, searched, or copied, no embedded fonts, no vector paths, and no interactive elements. This transformation is irreversible — you cannot recover the original vector content from a rasterized PDF. For this reason, always keep a copy of the original document.

Rasterization differs from flattening in a fundamental way. Flattening merges interactive layers (form fields, annotations) into the page content stream while preserving vector text, embedded fonts, and searchability. Rasterization eliminates all structured content — vector and interactive alike — leaving only pixel data. Use flattening when you want to lock form values but keep text selectable; use rasterization when you want to eliminate any possibility of text extraction or content editing.

Why Use This Tool

Rasterizing a PDF serves several important purposes across legal, security, and production workflows:

  • Redaction locking — After redacting sensitive information with black rectangles in a PDF editor, rasterizing the document ensures the redacted content is permanently destroyed. Without rasterization, redaction overlays can sometimes be removed to reveal the underlying text. Rasterization converts everything to pixels, making removal impossible.
  • Preventing text extraction — Documents containing proprietary data, pricing tables, or trade secrets can be rasterized before external distribution. Recipients can view and print the document but cannot select, copy, or programmatically extract the text content.
  • Cross-platform rendering consistency — PDFs that use uncommon fonts, advanced transparency, or complex color spaces may render differently across viewers. Rasterizing "bakes" the correct visual output into each page, guaranteeing identical appearance on every device and in every PDF viewer.
  • Print proofing — Rasterizing at 300 DPI produces a pixel-accurate representation of what will be printed. Designers and print shops use rasterized proofs to verify that fonts, colors, and layout are correct before committing to a production print run.
  • Font licensing compliance — Some font licenses prohibit embedding in distributed documents. Rasterizing converts font outlines to pixels, removing the embedded font programs from the file and eliminating any licensing concerns.
  • Reducing attack surface — PDFs can contain JavaScript, embedded files, and executable actions that pose security risks. Rasterization strips all active content, producing a file that contains only image data — the safest possible PDF format for receiving from or distributing to untrusted parties. For deeper cleaning, combine with PDF Sanitize.

Processing PDFs locally in your browser is particularly important for rasterization workflows. The documents most commonly requiring rasterization — redacted legal filings, confidential financial reports, classified government documents — contain sensitive information that must never leave your device. This tool guarantees zero network transmission throughout the entire process.

FAQ

What does rasterizing a PDF mean?
Rasterizing converts each PDF page from vector-based content (text, paths, fonts) into a pixel image, then embeds that image back into a new PDF. The output looks identical to the original but contains only bitmap data — no selectable text, no editable vectors, and no embedded fonts. Each page becomes a single full-page image at the resolution you specify.
What DPI should I choose?
72 DPI produces small files suitable for screen-only viewing and email. 150 DPI is a balanced choice for general-purpose distribution where readability matters but file size should stay reasonable. 300 DPI is the professional print standard, preserving fine detail in text and line art at the cost of larger output files — roughly 4x the size of 150 DPI output.
What is the difference between rasterizing and flattening a PDF?
Flattening converts interactive elements (form fields, annotations) into static content while preserving vector text, fonts, and searchability. Rasterizing goes further: it converts everything — text, vectors, images — into pixel data. Rasterized pages are not searchable or editable, making rasterization the stronger option when you need to prevent any form of content extraction.
Should I use JPEG or PNG format for rasterized pages?
JPEG produces smaller files and works well for pages with photographs, gradients, or complex color artwork. PNG is lossless and better for pages with sharp text, line art, or diagrams where JPEG compression artifacts would be visible. For most text-heavy documents, JPEG at 85% quality offers a good balance between file size and visual fidelity.
Is my PDF uploaded to a server during rasterization?
No. The entire rasterization process runs locally in your browser using pdfjs-dist for rendering and pdf-lib for output assembly. Your PDF is loaded into browser memory, each page is rendered to a canvas element, and the result is saved as a new PDF — no data is transmitted over the network at any point.