Cheers Martin. Any chance you can also give the code to create a DCL global symbol with this info in, e.g. PDFPAGES == "34"?
Rob. -----Original Message----- From: "Vorl�nder, Martin" [mailto:[EMAIL PROTECTED] Sent: 19 May 2004 11:06 To: [EMAIL PROTECTED] Cc: Atkinson, Robert Subject: RE: Counting PDF Pages Atkinson, Robert <[EMAIL PROTECTED]> wrote: > I've downloaded the modules for counting PDF pages with Perl. > I then copied the example :- > > use PDF; > $pdf=PDF->new ; > $pdf=PDF->new(filename); > > $result=$pdf->TargetFile( filename ); > > print "is a pdf file\n" if ( $pdf->IsaPDF ) ; > print "Has ",$pdf->Pages," Pages \n"; > > When I run the program though, I get this error :- > > > ALPHA_ROB$$ perl sys$login:rob.tmp webreport$store:S2HV_NL_20040512_0A7A.PDF > can't open filename: no such file or directory at sys$login:rob.tmp line 3 > %SYSTEM-F-ABORT, abort Change the example script to - get the filename from the command line (@ARGV array) - feed it into the PDF module methods (filename -> $filename) Modified example: use PDF; $filename = $ARGV[0]; $pdf=PDF->new ; $pdf=PDF->new($filename); $result=$pdf->TargetFile( $filename ); print "is a pdf file\n" if ( $pdf->IsaPDF ) ; print "Has ",$pdf->Pages," Pages \n"; Hope it helps, Martin -- Your mouse has moved. | Martin Vorlaender | OpenVMS rules! Windows must be restarted | work: [EMAIL PROTECTED] for the change to take | http://www.pdv-systeme.de/users/martinv/ effect. Reboot now? [OK] | home: [EMAIL PROTECTED] *********************************************************************************** Any opinions expressed in email are those of the individual and not necessarily those of the company. This email and any files transmitted with it are confidential and solely for the use of the intended recipient or entity to who they are addressed. It may contain material protected by attorney-client privilege. If you are not the intended recipient, or a person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. Random House Group IT Department helpdesk +44 (0) 1206 255900. http://www.randomhouse.co.uk http://www.booksattransworld.co.uk http://www.kidsatrandom.co.uk ***********************************************************************************
