Using Okular in Linux you can choose the function "Rectangle" with a black stroke and black fill out, then you can select any text that you want to black out. Another option is using the "Highlighter".
A Critical Technical Warning on PDFs:
When you draw a black box over text in a vector PDF editor (like LibreOffice or Okular), the text underneath the box can sometimes still be highlighted and copied by a tech-savvy user. To guarantee the data is permanently destroyed before submitting it to a public record, you should "flatten" it.
pdftocairo -pdf input.pdf output.pdf
The "pdftocairo" is under the Poppler utilities, it is a cleaner, single-line command available that handles all the PDF pages seamlessly while preserving the output as a sharp, vector-based PDF file. It flattens the Okular layers instantly, rendering the text underneath the black boxes completely unrecoverable.
Another option for flattening a PDF file is with PDFTK:
pdftk input.pdf output flattened_file.pdf flatten
A command to concatenate or merge several PDF files into one is the following:
pdfunite one.pdf two.pdf three.pdf all.pdf
The first three files will be merged in that order given, all into the last file "all.pdf".
If there are still text leaked from the black outs, it means the flattening was not performed correctly. Next it's another option:
How to Fix This Immediately (100% Secure)
You need to completely flatten the coordinate plane so that text no longer exists as character data, turning it purely into a pixel bitmap image. Run this precise sequence in your terminal to completely sanitize the file before filing it:
Step 1: Render the PDF into High-Quality Images
This completely destroys the font/text stream layer and turns every character into unselectable visual pixels.
pdftoppm -png -r 150 All_Exhibit_Docs.pdf page
This cleanly outputs your pages as:
page-1.png , page-2.png , page-3.png , etc.
Step 2: Ensure the Black Boxes Are Hardcoded Pixels
If your original PDF file has true black boxes drawn on them, pdftoppm will capture them as permanent black pixel areas. If any text was showing through, open those specific PNG files in an image editor (like GIMP or Okular) and paint over them using a solid black brush.
Step 3: Recompile into a Unified, Flattened PDF
Convert those safe image pages back into a clean, unified PDF document.
Once those images are generated, you can seamlessly combine them back into your final, completely flattened, and secure PDF using img2pdf:
img2pdf page-*.png -o Secure_Master_File.pdf
Or alternatively with:
convert page-*.png Secure_Master_File.pdf (or "gm convert" )
Testing the Final File
Once you generate the Secure_Master_File.pdf, run this final check to verify its security:
pdftotext Final_Secure_Master_Exhibit.pdf -
If the command returns completely blank output or no selectable text, your document is safely flattened and fully compliant. Be cautious when using the Ghostscript or pdfunite commands since the outputs might affect the security of the flattening.