Open dskim opened 5 years ago
Hi @dskim ,
Could you send me a PDF, so I could reproduce the issue and test solutions?
Thanks, Bo.
P.S.
Workaround: for now, it should be possible to work around PDF issues by opening the PDF and reserving it / printing it to a new PDF. Usually, OS services (like macOS Preview and PDF printers on Windows) produce friendlier PDF files than most PDF authoring applications (like Adobe).
Hi @boazsegev,
Sorry for the late reply. It's got some possibly sensitive information so I can't share it for now.
We've avoided using that PDF to get around for now, but we'll try your workaround next time. Please feel free to close it if you can't do much without the original pdf. I'll try send you a copy if we encounter another one down the track.
Thanks a lot for your help.
Regards, David
Hey there,
Thanks for your awesome gem.
I'm having the same error message. Here is the file : https://subclic.s3-eu-west-1.amazonaws.com/github/test-zlib.pdf
Hello, any update on this? I'm having the same error
Don't know if this helps in your case, but here's our workaround: we rescue the error in the combine process, generate an error page with prawn and add it to the combined result for the user to figure out or manually download the malformed PDF.
rescue Zlib::DataError error_page = Prawn::Document.new do text "ERROR: Document skipped (Zlib::DataError)" stroke_horizontal_rule pad(10) { text "The following document was skipped due to an error: #{File.basename(file.path)}", size: 10 } end pdf = CombinePDF.parse(error_page.render) end
Hi,
We've just encountered this issue with an pdf that we're attaching to our pdf generation process.
I'm not too sure the cause of this other than the fact that Zlib doesn't seem to like the format of this content.
Here is the stacktrace.
And here is the inspected value of
object
in line 69.Please let me know if you need anymore info from me. Thanks a lot for your help.