Sunday, May 29 2005 @ 04:08 PM PDT
Contributed by: Brian High
Views: 11,672
Where I work, we need to edit the document properties (metadata) of PDFs so that our search engine can find the documents easier. Up until now, we had to purchase copies of Adobe Acrobat (Full Version) just to do this simple task. This seemed like a lot of money to pay for something so simple.
Last Friday I stopped by my local library and checked out PDF Hacks and saw the page about pdftk. This was exactly what I was looking for! I toyed with it for a little while and decided to write a front-end for it. I know there is PDFTK Builder, but it does not do what I need.
So I have created two graphical front-ends to pdftk which are specifically to edit metadata (using pdftk's update_info feature).
Both scripts allow you to edit Title, Author, Subject, and Keywords.
The first script is a very simple VBScript program that can be run under Windows:
pdfmeta.vbs.
Just drag the PDF onto the script icon and follow the prompts. No other software is required, so long as you have Windows Script Host installed. (Most Windows systems come with WSH installed by default.)
I also wrote a nicer Perl/Tk version that is cross-platform which is here: pdfmeta.pl.
This is a nicer interface and is a little better written, so that it would be very easy for you to modify the script to use different fields. (Just change one line.)
If your operating system supports it, you can drag a PDF file onto the script icon, or you can just execute the script and there is a drag and drop interface for selecting the input file.
I have tested pdfmeta.pl under Debian GNU/Linux and Windows (2K Pro and XP Pro).
All Windows users need to do is install the Standard Edition of ActiveState's ActivePerl before using pdfmeta.pl.
(Most Linux/Unix systems should already be set up for Perl/Tk support.)
Please let me know of any bugs or suggestions. Thanks!