#!/usr/bin/perl use strict; use warnings; use PDF::API2; use Data::Dumper; my $FName = shift // die "Missing filename!"; my $pdf = PDF::API2->open($FName) or die "Can't open PDF file $FName: $!"; my %pdfinfo = $pdf->info; print "Author is: ", $pdfinfo{Author}, "\n"; print "Title is: ", $pdfinfo{Title}, "\n"; print "\n\nAll info tags:\n", Dumper(\%pdfinfo); #### Author is: Texas Instruments, Incorporated [SNAS033,D ] Title is: LM4873   Dual 2.1W Audio Amplifier Plus Stereo Headphone Function (Rev. D) All info tags: $VAR1 = { 'ModDate' => 'D:20121201221441-06\'00\'', 'Subject' => 'Data Sheet', 'Creator' => 'TopLeaf 7.6.028', 'Title' => 'LM4873   Dual 2.1W Audio Amplifier Plus Stereo Headphone Function (Rev. D)', 'Keywords' => ', SNAS033,SNAS033D', 'CreationDate' => 'D:20121201221441-06\'00\'', 'Producer' => 'iText 2.1.7 by 1T3XT', 'Author' => 'Texas Instruments, Incorporated [SNAS033,D ]' };