Changing PDF Metadata on Ubuntu

January 4th, 2010

I got a Sony E-Reader as a Christmas present from my parents this year. I absolutely love it! It will definitely change how I read books. I no longer have to lug around several books everywhere I go. The best part is that I can put all my journal articles in it. I no longer have to print off hundreds of pages of journal articles. However, there is one thing that I have found really annoying. It is practically impossible to find programs that change the pdf’s metadata. It took me awhile to find one that actually worked.

I ended up finding a Linux Program called PDFTK. I wanted to go over some basic commands (mainly so that I can find them easily).

Installing PDFTK:

sudo apt-get install pdftk

Edit Existing Meta-Data:

pdftk book.pdf dump_data output report.txt

You can then edit the data in report.txt which we can later upload back to the pdf. The text file will contain key value pairs like:

InfoKey: Title
InfoValue: Coders At Work
InfoKey: Author
InfoValue: Peter Seivel
InfoKey: Subject
InfoValue: Programming

After you edit this file, you can update the new meta-data to the pdf.

Update PDF Meta-Data:

pdftk book.pdf update_info report.txt output bookcopy.pdf

No comments yet.

Leave a Reply