http://qs321.pair.com?node_id=608142


in reply to Re^2: Error when trying to loop through DB and run a script
in thread Error when trying to loop through DB and run a script

this code appears out of order, perhaps, so i'm not sure what is going on. my guess is that the my $pdf = ... is at file scope, so setImage() is reusing the same $pdf object every time, and it probably shouldn't. consider creating a fresh PDF::API2 object each time through your while loop, and passing it explicitely to the setImage function.

Replies are listed 'Best First'.
Re^4: Error when trying to loop through DB and run a script
by ikkon (Monk) on Apr 03, 2007 at 19:50 UTC
    yep this is it, i declared pdf globaly and it worked, thanks.