this post was submitted on 23 Dec 2025
344 points (99.7% liked)
AntiTrumpAlliance
1587 readers
4 users here now
About
An alliance among all who oppose Donald Trump's actions, positions, cabinet, supporters, policies, or motives. This alliance includes anyone from the left or the right; anyone from any religion or lack thereof; anyone from any country or state; any man, woman or child.
Rules
-No pro-Trump posts or comments
-No off topic posts
-Be civil
-No trolling
-Follow Lemmy terms of service
Social Media
Other Communities
!desantisthreatensusa@lemmy.world

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If anyone would like to post instructions for the pdf impaired...
I haven’t tried this, but this is what I’ve read:
You can highlight the redacted text, copy it, and paste the text into another document (like Word, WordPad, Notepad, etc.).
Another method I saw mentioned on Facebook:
“The backgrounds are transparent. Pull them into photoshop and throw a layer of white between the text and the black background and you have your text.”
If anything is unclear, please ask. Even if I can’t answer it, maybe someone else can.
It looks like the maintainers of the project have updated their project and page. It's much simpler now.
Installation:
Usage:
If anyone has any questions about this comment as well, please feel free to ask. I know what this comment means, but a few years ago I wouldn’t’ve had a clue.
You’re asking on Lemmy?
Here's step-by-step instructions for the tool that the OP of the reddit thread open sourced. It creates a side-by-side pdf of the redacted and unredacted version at the end.
No root access is required at any point.
Download and extract the files of https://github.com/leedrake5/unredact?tab=readme-ov-file
Create a python virtual environment, but make sure the destination folder doesn't already exist (~/.env) here.
While still having your virtual environment active, indicated by the (.env) before your pompt, navigate to the downloaded github project, where the 'redact_extract.py' file is located.
Copy whatever pdf document you want to try to unredact to the same location.
execute the script
The script should now have created a file for you in the current location with the redacted and unredacted version side by side.
To leave the virtual environment:
To enter it again:
To delete everything cleanly, just delete the virtual environment (~/.env in this case)
The project linked in evacide's Mastodon toot is even simpler to install. Create and activate a virtual environment like before, but at a different location (.env1 instead of .env, for example).
Then install the tool from pip in the virtual environment:
The tool is now installed and can be executed with a pdf file like so:
https://github.com/freelawproject/x-ray
(sorry for the bad formatting. after posting, I can't preview anymore to figure out how to fix it.)
Could you show some of what it extracted then?
I haven't tried any yet, except verify with sample from reddit's OP.
Here's a a google drive link from the reddit thread with three files. One original justice.gov pdf with bad redactions. The same file, unredacted. And a third single pdf side-by-side of the aforementioned two files. By default, OP's tool creates this side-by-side pdf.
You don't need the lame script. Just select the obscured text in a document like the one they linked to & copy & paste or have the voice reader read it back.