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

Dear Monks,

I am trying to extract a page from a pdf file. I use perl
on a Unix platform and installed the module PDF::Extract. Here is the code i use.

#!/usr/bin/perl -w use PDF::Extract; $pdf=newPDF::Extract(PDFPages=>"1",PDFDoc=>"/folder/form.pdf"); $pdf->savePDFExtract(PDFPages=>"1", PDFDoc=>'/folder/form.pdf',PDFCache=>"/folder");

When i use servePDFExtract... it looks like that it's working.
I get output on STDOUT.
But when i use savePDFExtract and try to output to PDFCache=>"/folder" i do not get form1_.pdf in /folder.
On Windows platform it seems to work ok, but form1_.pdf is always saved on C:\
Please help.

Thanks.
flin.

20030509 Edit by Corion: Changed title, added CODE tags

Replies are listed 'Best First'.
Re: PDF
by nite_man (Deacon) on May 09, 2003 at 08:35 UTC
    Try to check PDF extracting errors:
    #!/usr/bin/perl -w use PDF::Extract; my $pdf=newPDF::Extract(PDFPages=>"1", PDFDoc=>"/folder/form.pdf"); my $res $pdf->savePDFExtract(PDFPages=>"1", PDFDoc=>'/folder/form.pdf' +, PDFCache=>"/folder"); print 'ERROR: '.$pdf->getVars("PDFError") unless $res;
    and permissions of your dir where you tried store result.
          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);