Have you verified that $pdf2 is parsable by PDF::API2? (I assume you are using PDF::API2 you don't say) I have run into this problem before when the pdf I was sucking pages out of was not completly parseable by PDF::API2. I was able to resolve it a few times by opening a copy of the PDF I was working on and $pdf->clonepage as needed instead of importing from another pdf.