in reply to Re: Perl 8.10 PDF::API2::Simple problem (Perl versions)
in thread Perl PDF::API2::Simple problem

Hi, moritz!

Sorry, you are right. The script worked on Perl v5.8.4 built for i686-linux-thread-multi, and it causes problems on Perl v5.10.0 built for i686-linux-thread-multi-64int.

  • Comment on Re^2: Perl 8.10 PDF::API2::Simple problem (Perl versions)

Replies are listed 'Best First'.
Re^3: Perl 8.10 PDF::API2::Simple problem (module versions)
by almut (Canon) on Sep 10, 2009 at 09:52 UTC

    I'd suspect it's rather the module version (not the Perl version) that's responsible for the different behavior. So, to narrow down on the issue, it would be interesting to know what module versions you're using.  In case you still have both versions available, you could check (for both 5.8.4 and 5.10.0 — make sure you call the correct perl binary, if they're installed on the same machine):

    perl -MPDF::API2 -le 'print $PDF::API2::Version::VERSION' + (yes, Version::VERSION) perl -MPDF::API2::Simple -le 'print $PDF::API2::Simple::VERSION'

    As PDF::API2 is a pure-Perl module, you should be able to run either version of the module with either version of Perl without recompiling anything  (in case it should turn out that you have different module versions...)

      Hi again!

      Thank you very much for your time! I checked the versions as you suggested, and they are the same.

      But I was wrong. The white line appears on both versions of perl. It seems stupid, but the line appears when I insert only one image on the page, like this:

      my $pdf = PDF::API2::Simple->new( margin_left => 15, margin_top => 15, margin_right => 15, margin_bottom => 45, line_height => 12, ); $pdf->add_page(); #insert image $pdf->image ( '/path/to/image/one/image1.jpg', width => 612, height => 50, x => 0, y => $pdf->y - 50, ); $pdf->saveas('/path/to/pdf_file/filename.pdf');

      If I add another image (only PNG) on the same page, everything looks ok. Any ideas?

      Thanks again!

        I tried with several images (various sizes, all jpg — one at a time of course), but I don't seem to be able to reproduce the issue with the white line — so I'm afraid I can't help much here...

        I used the current versions of the modules (PDF-API2-0.73, PDF-API2-Simple-1.1.4u) together with Perl 5.8.8 and 5.10.0, and checked the output with acroread and xpdf.