in reply to Perl PDF::API2::Simple problem

You seem to be quite confused about Perl versions.

Versions I know of include

I can't make any sense of the "Perl 8.10" you use in the title - which one do you actually mean? What does perl -v say?

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Perl 8.10 PDF::API2::Simple problem (Perl versions)
by constantin.iliescu (Initiate) on Sep 10, 2009 at 08:14 UTC

    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.

      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!