Flatten a redacted PDF or keep it searchable: how to choose

Should you flatten a redacted PDF? Learn what flattening and rasterizing remove, when the recipient needs searchable text, and which checks to run.

Flatten a redacted PDF only when the recipient just needs to read the pages: rasterizing turns each page into an image, so search, copy and screen reader use stop working. If the recipient must search, copy or listen to the document, keep a searchable redacted PDF and check that the removed words are gone from its text layer.

Either way, flattening is not the redaction. Apply a real redaction first, choose the output for the person who receives the file, then test the saved copy for removal and for usability as two separate results.

What does flattening a PDF actually do?

“Flatten” covers two different operations, and the difference decides what is left in the file:

  • Flattening annotations and form fields merges comments, drawn shapes and field values into the page content. The page still holds text. A black rectangle drawn on top becomes part of the page, but the words underneath can remain in the file, selectable and searchable.
  • Rasterizing (flattening to an image) renders each page as pixels and rebuilds the PDF from those images. The original text objects are gone from the rasterized page, so search, selection and copy find nothing until OCR adds a new text layer.

Neither operation replaces the redaction itself. Mark what must go, apply redaction so the content is removed, then decide on the output format; the general PDF redaction steps and final checks cover that sequence. If the source pages are scans, the image and its hidden OCR words need their own treatment, described in how to redact a scanned PDF and its OCR text.

Does flattening a PDF remove redacted text?

Flattening annotations does not remove text that a box only covers. The UK Information Commissioner’s Office warns that covering information with shapes, or matching text color to the background, is easy for a recipient to undo (ICO guidance on hidden personal information in documents). Merging that shape into the page does not change the result: the difference between a drawn overlay and a real redaction is explained in black rectangle or PDF redaction: what actually changes.

Rasterizing removes the original text objects from the page it converts, but it has limits:

  • It only treats what is drawn on the page. Document properties, attachments, bookmarks and stored form values can survive, depending on the method.
  • It can keep or add a separate text layer if the export runs OCR automatically.
  • A rasterized page still shows every pixel that was not redacted. If a name was only partly covered, it stays readable in the image.

So rasterizing can be a useful last step, not a proof of removal. PDFRedactLab prepares the sharing copy before this choice: you review each marked zone visually, apply redaction and export a redacted PDF, as shown in the PDFRedactLab review and export steps. You then decide whether that copy must stay searchable for its recipient.

Should I flatten a PDF after redacting?

Start from what the recipient must do with the file, not from the label of the output.

Recipient taskRasterized (image-only) copySearchable redacted copyTest on the saved copy
Read the pages on screen or on paperWorks if the resolution is high enoughWorksRead the smallest needed label at the intended size
Find a reference in a long dossierFails until OCR adds a text layerWorks if the text was keptSearch a retained term on the affected page
Copy a retained sentence or figureFailsWorksCopy it and compare words and order
Use a screen readerFails without OCR, tags and reading orderPossible, still needs tags and reading orderRead a heading, paragraph and table in order
Reduce the chance of leftover text objectsStrong on the converted pagesDepends on the redaction methodSearch the removed words on every affected page

A flattened copy suits a short document that will be read once, printed or attached to a file where nobody needs to search it. A searchable copy suits a long dossier, a contract with clause references, a spreadsheet export or any reader who relies on assistive technology. The last row of the table is not a claim of accessibility conformance; searchable text alone does not make a PDF accessible.

When the recipient needs searchable text

Keep the text, and make sure the redaction removed the selected words from it. Before exporting, pick one retained term per affected page and one removed term. After exporting:

  1. Search the removed term. It should return no result on any page.
  2. Search the retained term on the page you redacted, not only on an untouched page. A file-wide hit on page 8 can hide a failure on page 3.
  3. Select and copy a retained sentence next to a redacted area. Paste it into a plain-text view and check that no removed word comes with it.

If the source is a scan, the page has two layers: the image and the OCR text behind it. Searching the text layer says nothing about the pixels, and reading the image says nothing about the hidden words, so check both.

Image resolution and legibility after rasterizing

Resolution decides whether a rasterized copy is still readable. In a fictional A4 example, 210 × 297 mm rendered at 150 dpi gives about 1,240 × 1,754 pixels; at 300 dpi it gives about 2,480 × 3,508. Doubling the resolution gives roughly four times as many pixels, but it does not predict the size of the compressed PDF.

Neither setting is a universal recommendation. Test the smallest label the recipient needs, a thin table rule and a page printed at the expected size. If a digit becomes ambiguous, such as a 3 that reads like an 8, change the method or the resolution and repeat both the removal and the usability checks on the new file. Do not choose a setting only because the export is smaller.

Should you re-run OCR after flattening?

Re-run OCR only if the recipient needs search or copy and the flattened copy is the one you must send. OCR reads the visible pixels and creates a new text layer, so it brings back search without restoring the removed words, as long as the redacted areas are fully covered in the image.

That new layer is a new part of the file and needs its own review:

  • Search the removed terms again. A partly covered name can be recognized from the remaining pixels.
  • Compare recognized text with the page. OCR can misread digits, accents or a reference such as P-204, and a search that finds nothing proves little if the word was misread.
  • For screen reader use, OCR is one step. W3C’s PDF7 technique also covers correcting uncertain text, adding tags and checking the reading order.

Example: one dossier, two recipients

A fictional ten-page maintenance dossier goes to two people. Page 3 holds pump reference P-204 and a contractor’s name to remove; page 8 holds a retained service date.

  • The site manager reads the dossier once and files it. A rasterized copy at 300 dpi is acceptable: the name is redacted, the pages are legible and nobody needs search.
  • The maintenance colleague must find P-204 among other references. A rasterized copy fails this task. A searchable redacted copy is chosen instead, then tested: the contractor’s name returns nothing, P-204 is found on page 3, the date is found on page 8 and a copied sentence from page 3 contains no removed word.

Each result is recorded separately: readable, searchable, copyable, suitable for assistive use. One successful test does not prove the others.

Check removal and usability separately

A search that finds a retained reference tests searchability; it does not prove that every sensitive detail was removed. A copy with no searchable text proves nothing about the pixels or the hidden information. Run the checks on the exported file, reopened from disk:

CheckWhat it showsWhat it does not show
Search a removed wordThat word is absent from the text layerThat the pixels are clean, or that a misspelled variant is gone
Select and copy near a redacted areaNo hidden text sits under that areaThe state of other pages, attachments or properties
Zoom on the redacted areaThe image shows no readable remainsWhat the text layer contains
Open document properties and attachmentsWhat travels with the file outside the pagesWhat the pages display

If neither output meets the recipient’s need, agree on an alternative, such as a clearly labeled extract or a new export from a cleaned source, and review it the same way. Do not attach the original to restore search. The choice is complete when the copy you actually send meets the agreed tasks and has passed its removal checks.

Frequently asked questions

Should I flatten a PDF after redacting it?

Flatten only if the recipient just needs to read the pages and you accept losing search and copy. Flattening is not the redaction itself: apply a real redaction first, then check the exported copy whichever format you choose.

Does flattening a PDF remove the text under a black box?

Not necessarily. Flattening annotations merges the box into the page, but the original words can stay in the page content. Rasterizing turns the page into pixels and drops that text, unless OCR or another process adds a text layer back.

Is a flattened PDF still searchable?

A rasterized page is image-only and ordinary search finds nothing on it. A page where only annotations or form fields were flattened usually keeps its text and stays searchable. Test search on the affected page of the saved copy.

Can I run OCR on a flattened redacted PDF?

Yes, if the recipient needs search. OCR creates a new text layer from the visible pixels, so check that redacted areas return no words and that retained references are recognized correctly before sending.

Does flattening remove metadata and attachments?

Do not assume it does. Depending on the method, document properties, attachments, bookmarks or form data can survive a flatten. Inspect the hidden information of the exported copy as a separate step.

A thoughtful last step before sharing a PDF.

See the fictional review example

Request access to PDFRedactLab

Leave your professional email to get access to PDFRedactLab.

Submitting sends your email and visit context to BankStatementLab’s infrastructure for PDFRedactLab. No account, payment or automatic email is triggered. Privacy.