Redact a PDF: Black Boxes Don't Remove Text, Flatten First
A black box over PDF text doesn't delete it. Test your redaction, flatten pages to images on a Mac, cover them with solid boxes, and strip EXIF from photos.
GuideUpdated 8 min read
On this page
You covered an account number in a PDF with a black rectangle, and then someone pasted the "hidden" text out of it. Or you blacked out part of a photo and later learned it still carries a GPS location. Both are the same mistake: hiding something is not deleting it.
Test your redacted PDF first
Check the file you plan to send, not what the editor shows you:
- Open the redacted PDF in Preview.
- Press ⌘F (Command-F) and search for a word you covered.
- Press ⌘A to select everything, press ⌘C, and paste into a plain text document.
If the search finds the word, or the pasted text contains it, the redaction failed. If both come up empty on a PDF that visibly has text, the page has no text layer at all, which is what a flattened page looks like.
Why a black box doesn't remove anything
A PDF is made of layered objects. Text is one kind of object. A rectangle drawn with Preview's Markup toolbar or another annotation tool is another. The rectangle sits above the text and hides it visually. Delete the rectangle, or just copy the text, and the words come back.
A real redaction does one of two things: it removes the underlying text from the file, or it replaces the page with a picture so there is no text left to find. A PDF rebuilt from page images contains only pictures, so the original text layer, comments and form fields don't carry over.
Photos have a separate problem. A photo has no text layer, so a solid box on the pixels, saved as a flat image, is a true redaction. But EXIF metadata lives in the file next to the pixels and can include where and when the photo was taken and which device took it. No box covers that.
| Cause | Symptom | Fix |
|---|---|---|
| Rectangle annotation over text | Word is searchable or copyable | Apply a real redaction, or flatten to images |
| Redaction marked but not applied | Editor shows boxes, text still found | Run the apply step, re-test the saved file |
| Layered export of an image | Box can be moved or removed | Export a flat PNG or JPEG |
| EXIF left in a photo | Location or device visible in an inspector | Strip metadata from the shared copy |
Fix 1: Use a PDF tool that applies redactions
Some PDF editors have a redaction mode that marks content and then applies it, which deletes the text underneath. Two cautions apply to any tool:
- Marking an area is not applying it. Many tools need a second step before the removal is permanent.
- Run the search and copy test on the saved file, not on the editor window.
Treat Preview as annotation-only. Apple's Markup documentation describes shapes, text, signatures and similar tools, not redaction, so don't trust Preview's shapes for secrets on a PDF. Adobe Acrobat is a paid editor with a redaction feature, and it is a sensible choice for long contracts where you need to keep selectable text in the rest of the document. Test the output either way.
Fix 2: Redact a PDF by flattening it to images
This works with free tools on any PDF, though it is manual. The result has no selectable text, which is the point.
Turn each page into an image
- Open the PDF in Preview and zoom until one page fills the window at a readable size.
- Take a screenshot of the page with Command-Shift-4, or with Pixfinch's Capture Area (⌃⇧4, Control-Shift-4).
- Repeat for every page, in order.
A screenshot only captures what is on screen, so resolution depends on your zoom level. Zoom in more for small print, or capture a page in two parts.
Redact the images
Pixfinch's Solid Box redaction is opaque and can't be reversed. Pixfinch's help is explicit that only Solid Box can't be reversed, and that blur is for softening, not for secrets.
- After a capture, hover the Quick Access card and click Annotate, or choose Open Last Capture from the menu-bar icon.
- Press B to pick the Redact tool. Its style is Solid Box by default.
- Drag over every piece of sensitive text.
- Optional: click Auto-Redact (⇧⌘R). It covers URLs with credentials, API keys, labeled secrets such as
password: …, email addresses, IBANs, card numbers, IP addresses and phone numbers, and runs on your Mac. - Press ⌘S to save. By default the file goes to
~/Desktopas a PNG.
Two things to know about the original capture. By default Pixfinch copies each capture to the clipboard and adds it to History. When you copy, save, pin or share a capture with redactions, its History entry is replaced with the redacted version. An unredacted page you captured and closed without saving or copying stays in History as taken. See Capture History to review or delete it.
To keep pages in order, note that the default file name includes date and time, so names sort in capture order if you captured in page order. For explicit numbering, add the Counter token ({counter}) to the file name template in Settings › Output › Saving.
Rebuild the PDF
- Select all the page images in Finder.
- Control-click and look for Create PDF under Quick Actions.
- If you don't see it, open the images together in Preview, select all thumbnails in the sidebar, choose File › Print, and use the PDF menu in the print dialog to save as PDF.
Check the page order, then run the search and copy test on the new PDF. Nothing should be found. Expect a larger file and no searchable text, so keep the original somewhere private if you need the text yourself.
Redacting a photo
Cover the sensitive area with a solid box and export a normal flat image (PNG or JPEG), not a layered project file. Pixfinch can open JPEG, HEIC/HEIF, PNG, TIFF, WebP, GIF and BMP files through Open Image… (⇧⌘O) and saves edits as new files, so the original stays untouched.
Then remove metadata from the file you plan to share, using one of the methods below, and check the result. EXIF can include an embedded thumbnail, and some editors keep the original's EXIF when they save.
Strip EXIF location and device info from photos
In Preview
- Open a copy of the photo in Preview. Preview may save changes to the file itself, so don't work on your only original.
- Choose Tools › Show Inspector and open the i (More Info) tab to see the metadata.
- If the photo has location data, look for a Remove Location Info button and click it.
This removes location only, not the camera model or capture date.
When exporting from Photos
The export dialog in the Photos app has a Location Information option. Turn it off before you export. The exact layout varies by macOS version.
With Terminal (removes all metadata)
This needs ExifTool, a free third-party tool that is not part of macOS. You can install it with Homebrew (brew install exiftool).
exiftool -all= photo.jpgThis removes all metadata from photo.jpg, including GPS, camera model and any embedded thumbnail. It may also remove the color profile (colors can look slightly different in some apps) and the orientation tag (a photo may show sideways). ExifTool keeps the original as photo.jpg_original. Delete that backup, or don't share it, if you want the metadata gone for good. To undo, rename the _original file back to photo.jpg.
Quick option for casual sharing
A screenshot of the displayed photo is a new image, so it doesn't carry the original's camera metadata. You lose resolution, so use this only when quality doesn't matter.
Which method to pick
| Situation | Best choice |
|---|---|
| Long contract where you need selectable text | PDF tool that applies redactions, then test |
| A few pages, no special tools | Flatten to images, Solid Box, rebuild the PDF |
| One screenshot or image | Solid Box in an image editor, export flat |
| Photo with GPS you want gone | Preview's Remove Location Info, or ExifTool |
GIMP, a free image editor, also works for the image step: fill the area with a solid color on a flattened image and export as PNG or JPEG. Make sure the layers are merged and the export is flat.
Checklist before you send
- The search and copy test finds nothing on the file you are sending.
- Every page was checked by eye, including headers, footers and margins.
- Boxes are solid, not blur or pixelate used for secrets.
- Photos were exported flat and the shared copy was checked in Preview's Inspector.
- Unredacted originals and ExifTool
_originalbackups are not in the folder you are attaching.
If nothing works
If the text still appears after flattening, the file you sent is probably not the rebuilt one. If a PDF tool's redaction won't apply, contact that tool's vendor (for Acrobat, Adobe Support). For Pixfinch problems, use support. Include the exact steps and what the test showed:
Hello, I redacted a PDF by [method] and saved it as [file name].
After saving, searching for "[word]" in Preview still finds it / copying
the page text still includes it. macOS version: [version]. Tool and
version: [name, version]. Steps I tried: flattened pages to images,
rebuilt with Create PDF, re-ran the search test. Can you tell me why
the text is still present?Common questions
Does Preview's Markup redact a PDF?
No. Its shapes are annotations over the page, and Apple's documentation doesn't describe a redaction function. Use it for marking up, not for secrets.
Is blur or pixelate safe for secrets?
Not for secrets. Pixfinch's help says only Solid Box can't be reversed, and Auto-Redact never uses blur.
Does Pixfinch edit PDFs or strip EXIF?
No. It redacts images and photos with Solid Box and can capture PDF pages from the screen, but it doesn't edit PDFs and its feature list doesn't include removing EXIF.
Where Pixfinch fits
Pixfinch handles the image part: capturing pages and redacting images or photos with Solid Box, plus Auto-Redact for common secrets. For more, see Redact sensitive information or how to redact a screenshot safely. Pixfinch is part of MacSuite; you can try it free for 7 days. If capture fails, see Screen Recording and other permissions.