Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

tagging PDFs with keywords and filtering them later

by LanX (Chancellor)
on Nov 19, 2012 at 18:13 UTC ( #1004599=perlquestion: print w/replies, xml ) Need Help??
LanX has asked for the wisdom of the Perl Monks concerning the following question:


I'm having a big amount of PDF documents in a directory from various sources (word, scan, latex) which I would like to organize.

More or less the same way I can find PDFs with embedded text by using grep.

My idea is to add keywords/tags and to use an application to filter them by those keywords.

Any suggestions how to do this from command line, preferably with Perl?

Cheers Rolf

Replies are listed 'Best First'.
Re: tagging PDFs with keywords and filtering them later
by snoopy (Deacon) on Nov 19, 2012 at 21:38 UTC
    Image::ExifTool is a module for adding keywords and other searchable metadata to PDF files and various other image formats.

    You can use the OO interface, or its command line utility exiftool

    % # add keywords to a PDF % exiftool -keywords=perl -keywords=snoopy test.pdf % % # read them back % exiftool -keywords test.pdf Keywords : perl, snoopy
      Awesome! Thanks :)

      Cheers Rolf

      PS: CPAN rules! Really! =)

Re: tagging PDFs with keywords and filtering them later
by Anonymous Monk on Nov 19, 2012 at 18:18 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1004599]
Approved by Athanasius
[Corion]: Meh, first round of escalations for me not wanting to fix in production what a project has mismanaged. Now another project, which eats up all the resources until end of this year wants to take that task and put it on my list of things as well.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-08-17 12:16 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (287 votes). Check out past polls.