Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Redact PDFs

  1. #1
    Join Date
    Jul 2008
    Beans
    Hidden!

    Redact PDFs

    Is there any software available in ubuntu which can be used to redact pdf documents?

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,948
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Redact PDFs

    You can import PDFs into the GIMP. Then you should be able to black out the redacted area with the drawing and painting tools and re-export the PDF.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Redact PDFs

    Thread moved to General Help.
    Ubuntu 18.04 Desktop Guide - Ubuntu 20.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,158
    Distro
    Ubuntu

    Re: Redact PDFs

    You can do ad-hoc redacts with evince for the version used in Ubuntu 19.10.
    (Unfortunately it doesn't seem to be an option in earlier versions like what comes with Ubuntu 18.04,
    though you can install either the snap or flatpak versions which are newer)

    But in 19.10, simply highlight the section you want to redact then right click and select Highlight Selected Text.
    Then right click on the highlighted section again and select Annotation Properties.
    Then click on the color selection to open the color picker window and choose black.
    Close the color picker window and select Apply in the Annotations Properties window.
    It should show the highlighted section now blacked out.
    Closing the PDF should prompt you to save the edited document. (Save a Copy, which can save as overwrite or a new document if you want).

    Edit: if the pdf is a scanned document then you probably need something like gimp as stated above.
    Last edited by deadflowr; March 29th, 2020 at 06:34 PM.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    9,891

    Re: Redact PDFs

    I would use Xournal. It is very easy to use. It normally edits non-destructively by making an overlay. Once you are done, export the file to a new PDF.

  6. #6
    Join Date
    Feb 2014
    Beans
    24

    Re: Redact PDFs

    I assume that you already know this, given that you asked a question about redaction, but I don't think that the answers above will work - the underlying text will still be there and visible either via a simple copy or by looking at the source.

    Software that will do redaction is Master PDF Editor, although I don't think it is in the repositories and therefore you will have to download a deb to install.

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,863
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Redact PDFs

    The problem w/ redacting PDFs is that the underlying document still contains the data you don't want seen, ever. The only way around that is to re-author the document without the data, otherwise you risk having some slightly smart person, not a genius at all, disabling the annotations, thus being able to see all the data.

    if you cannot re-author using the source, then the next best way would be to print the document, take a black marker and block out the sensitive parts, then use a scanner to recreate the doc as an image. This will break all sorts of great things about PDFs like searches, copy/paste, etc.

    it's a tough situation. Anything so sensitive that needs to be redacted cannot afford to be leaked. No way, no how. There have been leaks like this in the business world with PR stuff that haunted companies for years. Leaks by Govts have been even worse. Anyone working with medical data needs to be extra careful, since those leaks are probably illegal with fines for each separate datum leaked.

    IF you don't use the analog method, be certain to validate that whatever method is used ACTUALLY does remove the underlying data. Don't leave it as a layer in gimp or as part of the base document when using any PDF-aware tool. Trouble lies in trusting those methods.
    Last edited by TheFu; March 30th, 2020 at 06:39 PM.

  8. #8
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,160
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Redact PDFs

    Gimp won't handle multiple pages and will convert the pdf to raster graphics (if it isn't already), reducing quality and making it harder to edit the file later. But pdf was never meant to be editable anyway.

    If it's a vector pdf, you can put a black bar over the text to make it disappear, but it's just as easy to remove that black bar again if you distribute the document electronically. If you want to print the document and hand it to its recipient that way, it may be OK (although not very secure if it's a proportional font).

    A pdf file with vector text consists of boxes with one glyph (a graphical representation of a character or ligature) each and a displacement to the next box, interspersed with small displacements used as kerns and spaces. There may be tools that can replace these boxes and displacements (or better, a long sequence of them at once) by black boxes, so that the glyphs are really gone. But even then, assuming it's a proportional font, the widths of the boxes make it easy to find out which glyphs used to be there.

    In the days of the typewriter black bars were effective. The bars were physically put on the paper with black marker, then photocopied, and fonts were fixed-width, so the only clue left for the reader was the number of characters.

  9. #9
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,158
    Distro
    Ubuntu

    Re: Redact PDFs

    I really only did a quick look at this issue earlier and so decided to look into it more and found LibreOffice 6.3+ has a redact function now.
    https://wiki.documentfoundation.org/...ure:_Redaction

    Now, only LibreOffice Writer actually has the feature in it's toolbar settings by default, but you can add it to all LibreOffice programs by adding it using the Tools > Customize utility.
    (adding it to Draw makes it easier since LibreOffice opens PDFs in Draw)

    There is also an apt package in the repos (for 18.04+) called pdf-redact-tools.
    I think the github page for it explains how it works,
    https://github.com/firstlookmedia/pd...ols#how-to-use
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  10. #10
    Join Date
    Oct 2005
    Location
    Al Ain
    Beans
    9,891

    Re: Redact PDFs

    Journal export to PDF makes the changes permanent - nothing underneath the redactions. I actually checked that some years ago.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •