Re: Sudden death of PDF::API2

[email protected] (Landry Le Chevanton)
Newsgroups perl.macosx
Message-ID <C5BDD0D7.9E8B%[email protected]>
I did also had problems with perl scripts after installing the security
patch. Strategy for fixing has been worked out and reported here:

http://bulknews.typepad.com/blog/2009/02/mac-os-x-security-update-2009001-br
eaks-perl-cpan.html

As well as in Apple forum
http://discussions.apple.com/thread.jspa?threadID=1905157&tstart=0

This recipe worked for me so far.

Landry


Le 15/02/09 12:10, « Alan Fry » <[email protected]> a écrit :

> I have an Intel MacPro running Mac OS X 10.5.6 (Perl 5.8.8) and a copy
> of PDF::API2. This has worked flawlessly for a long time.
> 
> Suddenly it has failed. There have been no changes at all to the
> machine apart from a recent 'Security Update', which I think had to do
> mostly with a loophole in Safari.
> 
> This minimal script:
> 
> my $pdf_in = PDF::API2->open($file_in) or die "$!\n";
> my $pdf_out = PDF::API2->new or die "$!\n";
> 
> $page = $pdf_out->page;
> $page->mediabox(595, 842);
> $gfx = $page->gfx;
> #$xo = $pdf_out->importPageIntoForm($pdf_in, 1);
> #$gfx->formimage($xo, 0, 0, 1);
> 
> fails with the error message:
> 
> Undefined subroutine &Compress::Zlib::compress called at /Library/Perl/
> 5.8.8/PDF/API2/Content.pm line 103.
> 
> However the folder 'Compress' is there, (alongside the folder
> 'PDF"which contains the module), the file 'Zlib' in that folder, and
> Zlib has a subroutine named 'compress'. So what can possibly have gone
> wrong here?
> 
> If the last two lines above are uncommented, the error message becomes:
> 
> Can't call method "infilt" on an undefined value at /Library/Perl/
> 5.8.8/PDF/API2/Util.pm line 667.
> 
> presumably as a result of failure to access Zlib subroutines?
> 
> I have run 'repair permissions' which has not altered the situation
> and run out of ideas of what to do next.
> 
> I would be most grateful if anyone could help.
> 
> Alan Fry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.