boazsegev / combine_pdf

A Pure ruby library to merge PDF files, number pages and maybe more...
MIT License
733 stars 154 forks source link

CombinePDF.parse is unable to process some PDF files #221

Open userrails opened 1 year ago

userrails commented 1 year ago

Here is my sample code that is working for most of the PDF urls hosted in s3, except for 1.

NOTE: because this is customer invoice file, I can't share the file.

@pdf = CombinePDF.new
@pdf << CombinePDF.parse(Net::HTTP.get_response(URI.parse(s3_pdf_url)).body)

Again, above code is working as expected for 90% of the pdf files, there is one file that is not working for me. I don't see any exceptions generated and not sure how to debug it.

CombinePDF do generates the final pdf and it is blank and looks like this:

image