PDF Metadata and A-PDF Rename

I have lots and lots of PDF files in my file archives. I guess a conservative estimates of all the engineering books, literatures, guides, etc, that I have accumulated over the years of my engineering career easily exceed 5,000 and maintaining this kind of library has always been a headache for me.

One of the most frustrating aspect of maintaining a PDF library is that most PDF files are not named correctly in their respective PDF metadata fields. This just make indexing the PDF files and future searching extremely taxing and most unproductive.

I have physically renamed all of my PDF files based on the following kind of naming convention. I tried to keep the scheme as simple as possible and while this scheme may not work for everyone, I find it suits my purpose rather well.

I have 3 main fields in the filename and this goes like this: AAA – BBB by CCC.pdf.

AAA refers to the type of materials. In my case, AAA can be “Book”, “Calculations”, “Design Briefs”, “Design”, etc. BBB refers to the actual name of the book/material, such as “Electrical Design Guide” and “CCC” refers to the name of the Author such as “G. Geoffrey”, etc.

So a file could be named as “Book – Electrical Design Guide by G. Geoffrey” and from this string, I can tell this is a PDF copy of a book I have and i know the title and author. This is all very basic stuff but the challenge comes when I wanted to populate the respective PDF metadata fields as part of the PDF file.

Any good PDF editors can do this kind of editing but NONE of them (well, I have tried a bunch of these editors and have not found any) will do an automatic batch editing for you. You are forced to edit each PDF file one by one and imagine the kind of pain I will have to endure editing all the files I have on my system.

The only PDF metadata editor that I know of that has the kind of features I am looking for is A-PDF rename by A-PDF.com. It is affordable and you can download a trial copy here. http://www.a-pdf.com/rename/download.htm

So what is so great about this editor? To put it simply, it supports user scripts similar to the syntax of object pascal. So you can generate your own scripts to populate the metadata whatever ways you like. There is even a built-in script generator that you can use as a base to modify for your own scripts. Pretty handy.

The following is one of the scripts I have written.

p,q :Integer;
temp: string;

p := Pos('by ', Filename);
if p > 0 then
temp := LeftStr(Filename, p - 1);
p := Pos('-', temp);
if p > 0 then
newTitle := RightStr(temp, Length(temp) - p);

q := Pos(ReverseString('by'), ReverseString(filename));
if q > 0 then
newAuthor := RightStr(filename, q - 1);

newCreator:= 'joseph';


What this script does is pretty simple really. It extract the respective “tags” from the filename and populate the metadata using these tags. Also, I populate the “creator” field with my name. I will not go into further details as the script is pretty self-explanatory the way I look at it.

The software is highly recommended.

Posted on April 3, 2011, in Computer, Hardware, Software, How-to's. Bookmark the permalink. Comments Off on PDF Metadata and A-PDF Rename.

Comments are closed.

%d bloggers like this: