in reply to use PDF; woes
I ran it like this:
Note: You did use the IscryptPDF method correctly. The documentation for PDF incorrectly lists it as IscryptedPDF.#!/usr/bin/perl -l use strict; use warnings; use PDF; my $file = '/root/abitl.pdf'; my $pdf = PDF->new; $pdf->TargetFile($file); $pdf->LoadPageInfo; if ( $pdf->IscryptPDF ) { print "File is password-protected"; } else { print "File is not password-protected"; }
In Section
Seekers of Perl Wisdom