
Thanks for the tip and thanks for reminding the world that adding a black rectangle to "hide" confidential information is just not enough in a PDF file. But unfortunately, the proposed method requires a lot of labour. There is commercial software called PDF Studio <https://www.qoppa.com/files/pdfstudio/guide/#t=redaction.htm> that claims to completely remove all traces of the redacted content from the document. Redacting content in PDF Studio is as easy as adding a redacting rectangle. A desktop licence of PDF Studio used to cost US $79, but the [small] company that made PDF Studio was acquired by Apryse a couple of years ago, and now the same licence costs US $149. However, I have seen a deal for US $79 (if I recall it correctly) during last year's Black Friday and Cyber Monday event. PDF Studio is written in Java, so it works natively on Linux. On Sun, 23 Mar 2025 at 16:00, D. Hugh Redelmeier via talk <talk@gtalug.org> wrote:
Sometimes you want to remove confidential parts of a PDF file. Governments do this all the time. I wanted to do this too.
It turns out to be hard. Governments get this wrong too. It is easy to scribble over something but skilled readers can remove these scribbles.
What I ended up doing was using GIMP. The best open source tool. I sure didn't want to put my confidential stuff through an internet tool
When loading the document into GIMP, it naturally puts each page in a different layer. That's not a great model but it kind of works. If your document is too big, break it up.
With the layers menu, you will see each layer listed. Back to front.
For each layer: look at the layer menu make sure that it is the only layer is visible: make sure that the only eyeball icon in the first column is for the layer of interest. click on the layer's image icon
Move to the image window. select the rectangle selection tool: Tools: Selection Tools: Rectangle Select (or other suitable tools) for each area to censor, select the area censor it by your choice of Edit: Fill With FG color or Fill With BG color (you will type these a lot so learn the shortcut)
select all the layers (in the Layers menu: all eyeballs on)
File: Export as: select PDF file type/suffix. Pick a new name to not overwrite your original.
The result may be a very large file. I reduced the size (and quality?) $ pdf2ps doc.pdf skinny.ps $ ps2pdf skinny.ps skinny.pdf This probably destroys resolution. You can use GhostScript directly and have more control. --- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk