logoalt Hacker News

Labo33305/03/20255 repliesview on HN

Nice! Recently I had the need for pdf censoring, aka not adding black rectangles but actually removing the content underneath and I still haven't found a suitable tool. Any recommendation? Or even python library to do it?


Replies

philjohnson05/03/2025

I developed another tool pdfredactoronline.com that does this. Full redaction/removal of content, not just blacking out text. I didn't include it in this tool for now due to the APGL license of the library that enables the redaction, but since something fully in the browser is kinda open source already, I'll see if I can comply with the license while including it in BreezePDF

ValdikSS05/03/2025

LibreOffice.

You can open PDF in LibreOffice Writer, just make sure to select "PDF - Portable Document Format (writer)" in the file selection dialog. This is very important, if you don't do that, the file will be opened in LibreOffice Draw instead of Writer.

fortran7705/03/2025

Do you want the black rectangle and the content removed? There are "redaction" tools. https://smallpdf.com/redact-pdf

show 1 reply
mamonoleechi05/03/2025

you can do it easily with Inkscape which supports the pdf format

andrecarini05/03/2025

Honestly, your best bet for securely erasing data from a PDF is by adding the black bars, printing it and then scanning the print.

show 1 reply