5

I am using ‘pdf-reader’ gem to read raw contents of pdf documents so I can post (http-post) them to an API. To confirm the API implementation can create a valid pdf document from the raw content, I wrote a small gist to validate my code to read the pdf content.

For some reason, I always keep getting ‘PDF does not contain EOF marker (PDF::Reader::MalformedPDFError)’.

Can anyone point me out where I am going wrong?

Som Poddar
  • 1,428
  • 1
  • 15
  • 22
  • Posting the PDF file you are writing would be more helpful. The 'most likely' explanation is that you are doing CR/LF translation which will invalidate the declared startxref offset (ie the xref won't start at the declared location). – KenS Dec 23 '14 at 08:43

0 Answers0