in reply to Life after DIE

If this is being referenced in a loop you could try something like this:
$_=PDF::Core::PDFGetline ($fd,\$offset); next if !/xref\r?\n?/;
instead of die. This will go on to process the next file.