Search HoldMyTwist

Browse all posts

How to redact a PDF and check the saved result

Use a free PDF redaction program, redact text in images, then see what's in the downloaded file. What does our fictional test wipe? What is missing with image-only output?

A magnifying glass examining black redaction strips on an illustrated document.

In short

  • If you draw a black rectangle over it, you can still recover the words. Try using a redaction tool, make the changes, and look at the saved pdf.
  • The free Starlight Tools way described below worked on our fake three page test. Search found the text but we needed to manually cover the text in the pictures.
  • The pdf it downloaded turned every page into an image, and so no text was searchable or interactive. It also increased the size of our small file by around 6x.
  • Always save the original. Look at the downloaded one before sharing. (What you can still see around the black bits.)

Our test used fake codes, pics, form, hidden doc info. Real-world check of one output, not security evaluation, no promise about all pdfs. For sensitive use, go with something your org approves and follow its release process.

1. Choose a tool that fits the document

If you are a Mac and you just want to remove selectable text, first try the Redaction Selection option in Preview's Markup toolbar. Apple explains that the redaction is permanent after you close the document. We didn't try the test file in Preview. Apple's Preview guide (opens in a new tab)

Another free way (LibreOffice) is to use Tools > Redact. Then Redacted Export (Black) or Redacted Export (White). Standard Direct Export to PDF does a review copy of the work in progress. It is not the same as the final exported redaction. That's their doc. Not us trying. LibreOffice redaction (opens in a new tab)

As for the browser demo, go to Starlight Tools' PDF redaction tool (opens in a new tab) and give it a go. We didn't have to pay or sign up to get the test to the end. Starlight claims it all happens in your browser. We didn't verify that or their data traffic. They mention technical logs, advertising, analytics in their privacy policy (opens in a new tab) too.

Watch out

This process makes everything into a picture. If you need text search, accessible reading order, functioning forms, or valid digital signatures for the recipient, please use a different, approved process. See output limitations (opens in a new tab) from Starlight for details on these limitations.

2. Open a copy and find repeated text

The reader will keep an intact copy in a separate folder. He will use Choose PDF to choose a copy to work on. The reader will separately find and mark each particular detail. In the case of the first particular detail, the reader will fill the name, phrase or identifier of the target detail into Exact word or phrase in Find and redact. After that the reader will press Find matches, check the page numbers and the snippets, choose the wanted results and press Mark selected. The button may contain the number of chosen ones. This cycle of actions will be repeated for all the other details. It includes spelling differences and the duplicated identifiers in the header or the footer. (In the recorded test the code of the header was visible on three pages. The search found 3 matches. All of them were marked.) In the test the code in the body text and the hidden layer of text under a picture were also detected. The words which are visible on the page may be non-readable as a text by this tool.

No results found for fictional img only code. Check image contents manually as well.

Starlight search for RASTER-ORCHID-263 returning zero matches.

Starlight search for RASTER-ORCHID-263 returning zero matches.

No results found for fictional img only code. Check image contents manually as well.

Open full-size image
In the image of the page it's the same fictional code even though it doesn't match anything in search.

The fictional code RASTER-ORCHID-263 visible inside a PDF image.

The fictional code RASTER-ORCHID-263 visible inside a PDF image.

In the image of the page it's the same fictional code even though it doesn't match anything in search.

Open full-size image

3. Cover pictures and check every page

Next page / previous page are for full PDF inspection. Drag over each image area you want to remove. Make sure you leave enough room around your content to encompass all characters' edges.

For our image-only code (RASTER-ORCHID-263), we received no hits from search while the image was visible on the page. This image was manually covered by us. We had another image, with corresponding hidden text which could be found by search. The redaction rectangle was tight around the text, so we put a bigger manual mark over the entire image area.

Remember to check for filled values in forms, and any comment symbols that are visible. Look around. There might still be a job title or part of an address or another sentence close by which gives the answer you are trying to hide.

Look at the coverage with ZOOM. We used black marks in our test. Don't go by a tiny thumbnail or assume the search-highlighted rectangle is everything you see.

The one you have selected, the resize handle is in the lower right corner.

A black manual redaction selected with a blue outline and a lower-right resize handle.

A black manual redaction selected with a blue outline and a lower-right resize handle.

The one you have selected, the resize handle is in the lower right corner.

Open full-size image

4. Apply the marks and download the result

  1. Select Preview and output color (if not already selected) and select black.
  2. For Output resolution select Balanced (200 DPI). This is what we used in our test.
  3. Review and export. Make sure the # of pages and marks are what you wanted to review.
  4. Apply redactions and create PDF
  5. Click Download redacted PDF. Find the file you saved (in our trial we added "-redacted" to the name).

Starlight output settings showing full opacity and Balanced 200 DPI, with rasterization tradeoffs.

Starlight output settings showing full opacity and Balanced 200 DPI, with rasterization tradeoffs.
Open full-size image

We had 12 points, 3 pages. 37875 bytes => 231306 bytes. Others might vary greatly.

There is Sanitization inspection on result page. Look at it but keep your own. How can you know did you tick all the info to be removed just by completion notice from some tool?

5. Check the downloaded PDF

Open the downloaded new file using the PDF viewer. Make sure you don't check the original by mistake (double check the file name).

  1. High zoom the whole pages and look for the black marks, same details, border of black marks, pictures not marked. Readable text from what you want to keep.
  2. Find all of the missing words or code. You may also try to select & copy from the marked area and paste to a plain text file.
  3. Check the document properties for any identifying info. Check attachments/comments/form fields if available (your PDF viewer may have these details).
  4. Check out the rest of context & file name that's showing before sharing only the checked one.

Watch out

Zero search results is not enough evidence that a PDF is safe. It's possible for a picture of a word to not have any searchable text in it. We noticed this in our picture only test. Even before any redactions were made.

It even stores words you pasted in as pictures. So you can't search/copy it as text anymore.

The test: what was removed

We compared our "unsafe copy" (just black shapes over the content) with the actual Starlight download. The unsafe copy had all ten fake target codes exposed in the text, images or other content in it.

For Starlight download, no target codes in extracted texts or decoded objects were found when we inspected it as PDF files (this is separate from above). We also ran text recognition to the output images and reviewed all three rendered pages. No target code was exposed. Readable sentences (supposed to be) were still readable. There was no remaining form fields, no annotations, no attachments, no bookmarks in the output. The original ID doc-property value was missing. New software/date meta-data was still there so technically not metadata-free. Tiny yellow piece of comment-icon was still there. Comment in it (content) and annotation object was gone. We had our test file with built-in hidden text layer. Did not try against OCR engine which builds this layer. Did not try encrypted PDFs, signatures, weird fonts or big files. This is good for this particular trial. Your own doc requires your own check.

If something is missing or still exposed

If you cannot find the stuff (if it's visible, mark it and look at the export). If there is some edge of the sensitive letters (or other sensitive stuff) which is still visible outside the masked part, go back to working copy, mask even more of that original part and try export again. Do not try to hack the pdf which was downloaded with some drawing rectangle (and think that you cleared this stuff).

If something you need is missing in the output, keep it private and find the way to do it with a workflow that keeps that feature. If you cannot verify that some confidential file is alright, don't go on with sharing, stop, and ask the guy who releases it to look at it.

Sources: Starlight PDF redaction (opens in a new tab), Starlight privacy (opens in a new tab), Starlight terms (opens in a new tab), Apple Preview (opens in a new tab), LibreOffice redaction (opens in a new tab).

Share this post