HomeBlog › Rasterization: the gold standard of PDF redaction

Rasterization: The Gold Standard of PDF Redaction

To rasterize a PDF is to re-render every page as a flat bitmap image and rebuild the document from those images, so the finished file contains pixels and nothing else. That is why rasterize-based PDF redaction is the strongest guarantee available short of retyping the document by hand: the text layer, the annotations, the hidden objects and the layer structure do not survive the conversion, because there is no longer any structure left for them to survive in. The cost is equally real — the output is no longer searchable, selectable or screen-reader accessible, and the file gets bigger.

Key takeaways

  • A PDF stores text as drawing instructions plus font data, not as pixels — which is why text hidden behind a black box is still in the file, fully extractable.
  • Rasterization throws that structure away: the page is re-rendered as an image, so no text layer, annotation, form field or hidden object from the original page reaches the output.
  • The US Court of Federal Claims calls drawing redaction boxes and then flattening the page to an image the most secure way to redact, because 100% of the information is removed in the conversion.
  • 300 DPI is the sensible default: it is the minimum US federal agencies must use to digitize permanent paper records, and the minimum most OCR engines want.
  • The downside is real. Rasterized pages are not searchable and not screen-reader accessible unless you re-run OCR — and re-running OCR rebuilds a text layer for the visible text only.

What does it mean to rasterize a PDF?

Rasterizing a PDF means re-rendering each page into a grid of pixels — a raster image — and building a new PDF whose pages are simply those images. The visible result is identical: same layout, same fonts, same page size. Everything underneath changes. Before rasterization the page is a recipe for drawing itself; afterwards it is a photograph of the finished dish.

Vector content is described mathematically — this glyph, from this font, at this coordinate — and stays crisp at any zoom. Raster content is a fixed array of coloured dots. The conversion is one-way: you can render vectors into pixels, but you cannot recover the instructions from the pixels they produced.

Rasterization redacts by destruction: the page is re-rendered as a flat image, so no text layer, annotation, form field or hidden object from the original page survives into the exported file.

In redaction terms it is the digital equivalent of a workflow courts have long recommended — print the page, black it out with a marker, rescan, shred the original — without the printer or the scanner.

How does a PDF actually store text?

A PDF does not store a picture of a page. It stores instructions for drawing one, and text is part of those instructions rather than part of any image. Each page carries a content stream: operators that select a font, set a position, then paint a string of character codes. The painting operator is normally Tj or TJ, and the string it takes is literal character data sitting in the file.

Those character codes are not the shapes you see. Each is mapped, through the font's encoding or a CMap, to a glyph in an embedded font program, and the glyph outline is what gets drawn. Fonts are usually subsetted, so the file carries outlines only for the characters actually used.

The consequence is that every PDF page has two independent readers:

Nothing forces those two readers to agree — the root cause of essentially every published redaction failure, and of the more basic problem that a black box is not redaction.

What disappears when a page is flattened to pixels?

When a page is rasterized its entire structure ceases to exist, because the output file has nothing left to hold it in. The renderer runs once, produces an array of pixels, and that array is all that gets written out. None of the following reach the exported file:

The limit worth knowing. Rasterization destroys everything on the page, but document-level metadata such as Author, Title, Producer and creation date lives outside the page content, along with attachments, bookmarks and XMP records. Treat metadata removal as a separate step.

One vocabulary warning, because it causes real accidents: "flatten" describes two operations. Flattening annotations merges markup into the page content but leaves text objects untouched, so the words underneath stay extractable. Flattening to an image is rasterization. Only the second is a guarantee.

Why is rasterization the strongest guarantee?

Rasterization is the strongest form of PDF redaction because it does not depend on a tool correctly finding and deleting the right objects — it discards every object and keeps only the finished picture. Object-level redaction has to be exhaustively complete: every character removed, no fragment left in a font subset, no duplicate in an incremental-update section, no copy in an embedded search index. Rasterization sidesteps that whole class of problem.

The US Court of Federal Claims describes drawing the redaction boxes and then flattening the page to an image as the most secure way to redact, because 100% of the information is removed in that conversion process.

The strongest argument comes from research into how object-level redaction fails even when it works. In the 2023 Privacy Enhancing Technologies Symposium paper Story Beyond the Eye: Glyph Positions Break PDF Text Redaction, researchers showed that many redactions leak through character positioning the redaction never touched: the text around a removed passage still records where each glyph sat, to sub-pixel precision, and those measurements constrain what could have filled the gap. Their tool, Edact-Ray, was tested against eleven popular redaction tools including Adobe Acrobat and de-redacted names in hundreds of public documents, among them inspector-general reports and FOIA responses.

That attack needs glyph-positioning data from the content stream. A rasterized page has none — no glyphs, no advances, no positions, only pixels on a fixed grid. Removing text is not the same as removing every trace of it. The NSA's guidance for publishing sanitized documents points the same way: where the source is an image, black it out, make sure the image is flattened with no layers, and only then convert to PDF.

What DPI should you rasterize at? 150 vs 300 vs 600

Rasterize at 300 DPI unless you have a specific reason not to. That number is not folklore: 300 pixels per inch is the minimum US federal agencies must use when digitizing permanent paper textual records under 36 CFR 1236.50, it is the resolution the Administrative Office recommended in 2009 for documents uploaded into the federal courts' CM/ECF system, and it is the minimum the Tesseract OCR documentation asks for.

DPI is the only quality knob rasterization gives you, and it controls three things at once: legibility on screen, print quality and file size. Pixel count scales with the square of the resolution, so doubling the DPI quadruples the pixels on every page — and roughly the bytes needed to store them.

ResolutionUS Letter pageGood forTrade-off
150 DPI1,275 × 1,650 pxScreen-only drafts, internal reviewSmall print and footnotes break up; too low for reliable OCR
200 DPI1,700 × 2,200 pxLong documents where size mattersFine on screen, marginal in print, still below OCR guidance
300 DPI2,550 × 3,300 pxThe default: court e-filing, archiving, printing, later OCRFour times the pixels of 150 DPI
600 DPI5,100 × 6,600 pxVery fine print, dense tables, small handwritingFour times the pixels of 300 DPI; rarely justified for ordinary text

An A4 page at 300 DPI is roughly 2,480 × 3,508 pixels. Federal court guidance is blunt about the upper end: a scanner set above 300 ppi makes documents unnecessarily large, and courts cap the size of PDFs accepted through CM/ECF. Compression matters as much as resolution — a 300 DPI page saved with aggressive JPEG can look worse than a careful 200 DPI one.

Rule of thumb: 300 DPI for anything that will be printed, filed or run through OCR; 150 DPI only for screen-only drafts; 600 DPI only when the smallest characters on the page genuinely need it.

What do you lose by rasterizing?

Rasterizing costs you everything a text layer provides: search, selection, copy-paste, machine readability and screen-reader access.

Taken together that is a real cost, not a footnote. For anything published under an accessibility obligation, plan the OCR and tagging work before you rasterize, not after someone complains.

Can OCR bring the searchable text back?

Running OCR on a rasterized PDF rebuilds a text layer, but only for the text that is still visible — and that is exactly why it is safe. Optical character recognition reads the image. It has no access to the original file, no content stream to consult, no memory of what used to be there. Where your redaction box is, the image holds a solid rectangle, and a solid rectangle contains no characters. There is nothing to find, so nothing is restored.

Re-running OCR after rasterization recreates a searchable text layer for the visible text only. The redacted pixels are no longer in the image, so there is nothing left for OCR to recover.

That is what makes rasterization practical rather than merely secure: the document is destroyed where it needs to be and searchable everywhere else. Three things to get right:

  1. Rasterize at 300 DPI or higher. The Tesseract documentation asks for at least 300 dpi. Redacting at 150 DPI and then OCR-ing gives you a text layer full of errors.
  2. Treat the new text layer as a transcription, not the truth. OCR guesses, and it guesses worst on names, account numbers and unusual words.
  3. Draw generous, fully opaque boxes. A box that clips the tops or bottoms of letters leaves partial shapes behind, and partial shapes are what a recognition engine is built to interpret.

Note the limit: OCR restores searchability, not accessibility. Tagged reading order, heading structure and alternative text are separate work.

When should you not rasterize?

Do not rasterize when the document must stay searchable, machine-readable or screen-reader accessible and nothing on it is actually secret. Rasterization is a security measure with a usability price, and paying that price for no security benefit is just damage. Reach for something else in these cases:

The alternative is object-level redaction in a tool that genuinely removes content, plus a separate sanitize step for hidden data — Adobe Acrobat Pro removes visible content when you apply the redaction marks and offers "remove hidden information" as a distinct operation for metadata, comments, attachments and scripts. Better still, if you own the source document, delete the sensitive passages in the word processor and export a fresh PDF.

How do you rasterize a PDF for redaction?

To rasterize a PDF for redaction you draw the redaction boxes first, then export with an option that converts each page to an image. The order matters: rasterizing a page that still shows the sensitive text just gives you a picture of the sensitive text. In SladdPDF, our free browser-based redaction tool, that export option is Secure mode.

  1. Open the PDF in your browser. The file is processed locally with JavaScript and WebAssembly; nothing is uploaded to any server, and the page works offline once loaded.
  2. Draw redaction boxes over every sensitive passage. Zoom in for small print, cover the full line height, use Ctrl+Z to undo. Check headers, footers and repeated fields on every page.
  3. Choose Secure mode on export. It rasterizes each page after the redactions are applied, so the underlying text, layers and hidden objects are destroyed and unrecoverable. Fast mode draws vector overlays instead and warns that underlying text may in some cases still be extractable — not for sensitive data.
  4. Set the image quality. 300 DPI is the right default; drop to 150 DPI only for screen-only drafts.
  5. Enable metadata removal so the title, author, creation tool and hidden tags go too. Rasterizing the pages does not clear document properties on its own.
  6. Verify the export. Open the finished file, press Ctrl+A then Ctrl+C, paste into a plain text editor. On a correctly rasterized document nothing comes out at all. That empty paste is the proof.

Being straight about the limits: the free version of SladdPDF redacts with no page limit but exports at standard resolution, and Pro — a paid licence key — unlocks high-resolution 300 DPI export. For batch work or mandated redaction logs, a desktop tool such as Adobe Acrobat Pro is the better fit.

One last step people skip: rasterization is thorough about the page and indifferent to everything around it, so finish with our guide to removing metadata from a PDF. A page made of pixels with the original author's name still in the document properties is not a finished redaction.

This article is general guidance, not legal advice.

Rasterize your redactions in the browser

SladdPDF redacts and rasterizes entirely on your device — your file is never uploaded. Free with no page limit; Pro unlocks high-resolution 300 DPI export.

Redact a PDF now

Frequently asked questions

Does rasterizing a PDF really remove redacted text?

Yes. Rasterizing re-renders the page as a bitmap and rebuilds the file from that image, so the content stream, fonts, annotations and layer structure are discarded. Whatever sat under an opaque redaction box was never painted into the output pixels. The US Court of Federal Claims calls drawing redaction boxes and then flattening the page to an image the most secure method, because the conversion removes 100% of the information.

What DPI should I use when rasterizing a PDF for redaction?

Use 300 DPI unless you have a specific reason not to. It is the minimum resolution US federal agencies must use when digitizing permanent paper records, the resolution recommended for federal court e-filing, and the minimum most OCR engines want. Drop to 150 DPI only for screen-only drafts, where small print starts to break up. Go to 600 DPI only for very fine print, and expect roughly four times the pixels.

Can a rasterized PDF be made searchable again with OCR?

Yes, and it does not undo the redaction. OCR reads the image, so it can only recreate a text layer for text that is still visible. The redacted pixels are not in the image, so there is nothing for OCR to recover. Expect recognition errors, and remember that OCR alone does not make a document accessible: tags, reading order and alt text are still required.

Does rasterizing a PDF remove metadata too?

Not automatically. Rasterization destroys everything on the page, but document metadata such as Author, Title, Producer and creation date lives outside the page content, and so can attachments, bookmarks and XMP records. Treat metadata removal as a separate step and check the document properties of the exported file. SladdPDF can strip metadata in the same export that rasterizes the pages.

When should I not rasterize a PDF?

Do not rasterize when the document must stay searchable, machine-readable or screen-reader accessible and nothing on it is secret. Rasterizing also breaks fillable form fields and does not carry over a digital signature, because the export is a new document. For public-facing publications with an accessibility obligation, use object-level redaction in a professional tool, or rasterize and then re-run OCR and tagging.

Sources
  1. US Court of Federal Claims: "PDF File Redaction Best Practices" — uscfc.uscourts.gov
  2. Maxwell Bland et al.: "Story Beyond the Eye: Glyph Positions Break PDF Text Redaction," Proceedings on Privacy Enhancing Technologies 2023 — petsymposium.org (preprint: arxiv.org/abs/2206.02285)
  3. eCFR: 36 CFR § 1236.50, "Requirements for digitizing permanent paper and photographic print records" — ecfr.gov
  4. US National Archives, Records Express: "Digitizing Records: Requirements for Paper and Photographs" — records-express.blogs.archives.gov
  5. US Bankruptcy Court, Northern District of Alabama: "Practice Pointer 14 — Submission of PDFs in CM/ECF" — alnb.uscourts.gov
  6. PACER: "Is there a limit on the size of the PDF files which CM/ECF will accept?" — pacer.uscourts.gov
  7. Tesseract OCR documentation: "Improving the quality of the output" — tesseract-ocr.github.io
  8. Section508.gov: "Module 4 — Converting Scanned Documents into Section 508 Conformant PDFs" — section508.gov
  9. Federation of American Scientists: "NSA: Redacting With Confidence" — fas.org
  10. PDF Association: "Font subsetting — how it works and when to use" — pdfa.org
  11. PDF Association: "PDF Graphic Operators Cheat Sheet" — pdfa.org
  12. Adobe: "Redact sensitive content in PDFs in Acrobat Pro" — helpx.adobe.com