A Note On How to Redact PDF Files
Redacting PDF files takes special consideration as it's a digital vector format that does not mean what you see is what you have.
Open the PDF in LibreOffice Draw. If the PDF has text, just change the text and the background color to be the same color, like black. Or, even if it is text, just use the rectangle tool to draw a black box over the text of whatever you want to redact.
Now, Export as PDF in LibreOffice.
Now, use Imagemagick's convert command to convert from pdf to pdf.
convert -density 300 in.pdf out.pdf
While it may seem like this does nothing, it actually does something important. convert always rasterizes the content, so your PDF will basically turn into images. Now, the PDF is digitally redacted. You'd get a similar effect, for example, if you printed the PDF and then scanned it back to PDF.