14

I need to provide comments on PDFs as part of the refereeing process for journal articles. How can I remove my name from the annotations I've made using Mac Preview? (they can be seen in Inspector: Annotations, but seem not to be editable)

2
  • What program are you using to make comments with? This question need a lot more detail in order to help you out. Please consider adding more details. Do you make the PDF yourself? How do you add the annotations? etc.
    – Rob
    Sep 11, 2013 at 11:24
  • Preview is very limited in its capabilities. You really need to find another PDF editor for this and many other tasks.
    – benwiggy
    Nov 28, 2020 at 18:27

5 Answers 5

11

I have the exact same problem. While you should anonymize yourself in the prefs, I don't fully trust that method, so:

  1. Make a copy of the annotated PDF file
  2. Drag and drop to open in a text editor like TextWrangler, or hex editor like HexEdit (Don't worry about any binary-looking weird characters)
  3. Search for your name and replace with the exact same number of Xs or I usually throw in a space among the Xs so it looks like a different name.
  4. Save the file in place
  5. Open in Preview and mouse over the annotations to see the anonymized version
6
  • 1
    Brilliant, this works - all I needed to know was that my name was being stored in plaintext. Easy enough, thanks!
    – keflavich
    Sep 11, 2013 at 15:08
  • 1
    I did not even need to use a hex editor. Plain old Emacs sufficed, as I used the replace-string function in the raw view of the file.
    – GDP2
    Mar 4, 2019 at 19:14
  • 1
    This seems no longer to work. I have just tried this on a PDF that has Preview comments that I need to anonymize. There's now an AnnotationDictionary that seems to be a binary object, and I am unable to find the display name by searching in the file (with emacs or with grep). Jun 4, 2019 at 23:01
  • That is disappointing Robert. Hope someone can find a workaround. Do you have a Hex Editor tool to try? I don't think grep would necessarily work.
    – beroe
    Jun 6, 2019 at 5:13
  • @RobertP.Goldman I was just able to change labels generated with Acrobat and with Preview version 10.1. I used vi to edit the file. The highlight text and notes showed up as plaintext, although the rest of the file was binary. Maybe there are different flavors of PDF that are compatible and ones that are not. Mine said PDF-1.3 at the top.
    – beroe
    Jun 6, 2019 at 5:22
7

In Preview, go to preferences

In the PDF tab

Select show or Not show the name in the Annotations !

enter image description here

3
  • 3
    This is great, but is there any way to remove my name from existing annotations?
    – keflavich
    Sep 11, 2013 at 15:06
  • apple seems to have worked hard to prevent this, all so that the nsa can track down anything in the end.
    – mjs
    Jan 23, 2022 at 16:31
  • Bad approach. Works for added text but my username still appears in highlighted text. Don't rely on this!
    – MCCCS
    Feb 6, 2022 at 10:21
4

MetaClean is a powerful tool to view, remove and edit metadata of Microsoft Office (Word, Excel, PowerPoint and Visio), OpenOffice (word processors, spreadsheets and presentations) and PDF (versions 1.0 and higher) documents.

http://adarsus.com/en/metaclean.html

Microsoft Windows, Linux, Unix and Mac OS X Platforms

3

Regarding the second answer, this does not necessarily work if the .pdf was created using a different application, even if it is modified in Preview. Always use the Inspector in Preview to make sure the Author metadata is anonymized, and if not, change it as the first answer suggests using a text editor (TextEdit works fine).

For example, I often "print" web pages to .pdf in Safari, particularly news stories. If I open one of those in Preview and look using Inspector, my name shows up, even though I have "Add name to annotations" unchecked in Preview preferences as the second answer suggests. It stays there even if I annotate the document in Preview and save it.

I assume this is because it was added when I printed to .pdf from Safari. Safari preferences do not have a way to change user ID or anonymize saved documents in its preferences, as far as I can tell, so it reverts to System-level account information and adds my name from there when saving.

Again, always use the Inspector in Preview to make sure the Author metadata is anonymized before sending out a sensitive document.

(This should answer keflavich's question in response to Answer 2. In Preview [as opposed to common office applications or other groupware], your name is not associated with your annotations but with the document as a whole.)

1

Here's my complete method:

export LC_CTYPE=C
qpdf --qdf --object-streams=disable file.pdf
sed -i "" "s/\/T \(UrCaseSensitiveUsername\)//g;" file.pdf
gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf file.pdf                    # To correct errors
qpdf --replace-input --object-streams=generate --recompress-flate --compression-level=9 out.pdf # To recompress

If you don't like calling GhostScript, you may instead use

sed -i "" "s/UrCaseSensitiveUsername/_________________/g;" file.pdf

where _________________ is the string composed of underscores having the same length as UrCaseSensitiveUsername.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .