Open sh-miyoshi opened 2 years ago
Hi there, I found an error while parsing PDF.
When parsing a PDF file containing an empty object like following,
14 0 obj << >> endobj ... /Resources 14 0 R
I got /Resources 0 0 R. PDF file does not contain 0 0 obj, so the PDF is broken. I suspect a bug in this method. https://github.com/boazsegev/combine_pdf/blob/master/lib/combine_pdf/renderer.rb#L92
/Resources 0 0 R
0 0 obj
pdf_data = ::CombinePDF.parse(File.read(pdf_file)).to_pdf
After this, I opened pdf by Acrobat Reader, and I found an error.
Hi there, I found an error while parsing PDF.
When parsing a PDF file containing an empty object like following,
I got
/Resources 0 0 R
. PDF file does not contain0 0 obj
, so the PDF is broken. I suspect a bug in this method. https://github.com/boazsegev/combine_pdf/blob/master/lib/combine_pdf/renderer.rb#L92Steps to reproduce
pdf_data = ::CombinePDF.parse(File.read(pdf_file)).to_pdf
After this, I opened pdf by Acrobat Reader, and I found an error.