Thursday, 15 September 2011

Extracting comments from PDFs

I received a reviewer's response from one of my submitted papers a while ago, and have delayed working on it because they had written their comments in the PDF using "sticky notes". Unfortunately, these notes don't print very well. I like to be able to read things off the computer, so this presented a problem. Thankfully, PDFs encode their sticky note comments in ASCII-formatted text, which meant that I was able to extract the comments using the beautiful linux command line:
grep -o --text /Contents\([^/]* review.pdf | tee comments.txt
This single line resulted in a nice text file for me to print as I please.

1 comment:

Mudit Dhakar said...

Can you suggest the same for windows ?