in reply to PDF::API2, $pdf->end

I may not be wise enough for commenting here, but no one else has so I guess it's better than nothing :)

The code snippet looks good(to me), but you indicate that the real code is in "several other loops". Is it possible you are calling $pdf_s->end on a file that already had $pdf_s->end called on it?

Is it possible that a particular pdf is causing the problem, have you kept track of the file names, and output the name of the current file when it crashes?

Replies are listed 'Best First'.
Re^2: PDF::API2, $pdf->end
by Tharg (Scribe) on Nov 07, 2011 at 09:55 UTC

    Re "Is it possible you are calling $pdf_s->end on a file that already had $pdf_s->end called on it? ", no, afraid not.

    Re "Is it possible that a particular pdf is causing the problem, have you kept track of the file names, and output the name of the current file when it crashes? " yes, absolutely. After the fact I know what file has caused the problem and if I use the same script etc again on it (on it's own or with other source files) I get the same results. However I haven't found anything common with the problem source pdfs yet.