in reply to Parsing PDF file
My guess is that the PDF files are broken. The ^M displayed in the error message could indicate that the file was transferred via ftp using ASCII mode and that broke the PDF files. There is nothing Perl can do to help.