Closed leviwilson closed 4 years ago
I'm going to close this for now and try to move this into the PDF
class. I'll re-open after we switch things around, thanks @boazsegev
@boazsegev please provide feedback on https://github.com/boazsegev/combine_pdf/pull/177 that we just opened. This should avoid the double-parsing of the PDF object and allow for the user to opt into throwing a CombinePDF::EncryptionError
in the event that the PDF is encrypted.
@boazsegev CombinePDF.encrypted?
would be very useful to provide feedback to the user.
In using
CombinePDF
, we have a need to understand whether or not a PDF is encrypted with a password or not.Given that
CombinePDF
will silently fail in this event, we don't really have a recourse for testing if it is or is not encrypted. Furthermore, we also have scenarios where we have password protected PDFs and we get a https://github.com/boazsegev/combine_pdf/issues/155 issue (Zlib::DataError
).What We Did
CombinePDF.encrypted?
true
if it's password protected;false
if it's not (testing theroot_object[:Encrypt]
to validate)ZLib::DataError
so it doesn't blow up when asking forencrypted?
.travis.yml
and make the:default
rake task be:test