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.
In Section
Seekers of Perl Wisdom