Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Making modifications for PDF Document info tags.

There is a CPAN module called PDF-111 (http://search.cpan.org/author/ANTRO/PDF-111/PDF.pm) which offers me the ability to read the Document Information tags in PDFs and there is another called PDF-Create-0.01 (http://search.cpan.org/author/FTASSIN/PDF-Create-0.01/lib/PDF/Create.pm) which will write them in new PDF documents. However I can find any way to edit these whole sale. I currently have a very large number of these files but to date my Perl have been mostly for fiddling various output into comma separated values so this is a bit beyond me.

What I think I need it a function like the GetInfo("Title") suppiled by PDF-111 for writing. The function seems to exist in the creation of a new PDF but I have no way to edit. Adobe's own batch processing is insufficient for what I need and I find nothing in Java using Adobes own SDK. Is there something that does this that I'm missing or I am I in essence asking for a new CPAN module?

I need to set the title tag to the same as the file name because when an Acrobat index is built it used the title tag not the file name as the reference in the search pane.

Replies are listed 'Best First'.
Re: Editing PDF document infomation tags
by idsfa (Vicar) on Oct 02, 2003 at 05:45 UTC

    I think you are looking for PDF::API2. The pod mentions explicitly:

    $pdf->info( 'Author' => " Alfred Reibenschuh ", 'CreationDate' => "D:20020911000000+01'00'", 'ModDate' => "D:YYYYMMDDhhmmssOHH'mm'", 'Creator' => "fredos-script.pl", 'Producer' => "PDF::API2", 'Title' => "some Publication", 'Subject' => "perl ?", 'Keywords' => "all good things are pdf" );
    and
    $pdf->update Updates a previously "opened" document after all changes have been applied.

    This looks like what you want ...


    Remember, when you stare long into the abyss, you could have been home eating ice cream.
      Many thanks