2012年3月8日星期四

Changing PDF Metadata on Linux

Recently, I found something in pdf title was really annoying. I decided to find out a way to change it and some other information. I came to a program called PDFTK. The first thing we need do is to extract the pdf information:
pdftk example.pdf dump_data output info.txt 

Then edit info.txt to like the following:
InfoKey: Title
InfoValue: New
InfoKey: Author
InfoValue: zhanlu
InfoKey: Subject
InfoValue: changed


Finally, update the pdf information

pdftk example.pdf update_info info.txt output new.pdf

没有评论:

发表评论