Editing pdf file using exiftool

I am really missing pdftk package on Fedora 21. Sometimes I need to modify metadata of pdf file and with pdftk it was easy by using its option dump_data option. With this option you will get a output with various metainformation to modify. This output contains information like

$ pdftk Fedora-20-Installation_Guide-en-US.pdf data_dump
InfoKey: CreationDate
InfoValue: D:20140113225921-07’00’
InfoKey: Author
InfoValue: Fedora Documentation Team
InfoKey: Title
InfoValue: Installation Guide – Installing Fedora 20 on 32 and 64-bit Intel-compatible computers
InfoKey: Creator
InfoValue: DocBook XSL Stylesheets with Apache FOP
InfoKey: Producer
InfoValue: Apache FOP Version SVN tags/fop-1_0
PdfID0: 1882d63af416c1657abf38064d7abc1
PdfID1: 1882d63af416c1657abf38064d7abc1
NumberOfPages: 290
BookmarkTitle: Installation Guide
BookmarkLevel: 1
BookmarkPageNumber: 1
BookmarkTitle: Table of Contents
BookmarkLevel: 1
BookmarkPageNumber: 3
BookmarkTitle: Preface


You can also save this information as

$ pdftk Fedora-20-Installation_Guide-en-US.pdf data_dump output metadata.txt

and when you modify this metadata.txt, you can update the pdf metadata using

$ pdftk Fedora-20-Installation_Guide-en-US.pdf update_info metadata.txt output modified-pdf.pdf

But with the retirement of pdftk package, I started to look some simple option to do this metadata updation and found exiftool a perl package. You can install this package as

yum install perl-Image-ExifTool

To view metadata of pdf file you need to use

$ exiftool input.pdf

To modify pdf metadata you need to use

$ exiftool -Title=”Set/Unset title text here” -Author=”Correct Author name here” input.pdf
I find this very easy to use when you just need to correct the Title of pdf file. The exiftool can be used also to modify image file’s metadata information.




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s