boazsegev / combine_pdf

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

PDF is Encrypted! Attempting to decrypt - not yet fully supported. #66

Closed kevshin2 closed 8 years ago

kevshin2 commented 8 years ago

When I try to open a PDF, I got the following error. PDF is Encrypted! Attempting to decrypt - not yet fully supported.

I was able to open the file in preview without password. Any recommendation on how to solve this?

boazsegev commented 8 years ago

Hi Kevin, thank you for opening the issue.

Could you send me an example file to test this on?

I know Decryption support is limited, but you might have run into an issue with the implementation.

Bo.

kevshin2 commented 8 years ago

Hi Bo,

The file attached would be a great example to test this on.

Thanks, Kevin @boazsegev

boazsegev commented 8 years ago

Thanks Kevin.

It seems to be an issue related to PR #61 and has to do with the way the encryption parameters were stored (they were stored as references, and these references aren't resolved at that point in the logic-flow)...

... This requires a deeper change to the Decrypt module and I'm labeling it under Enhancement rather then a Bug... Although I would like to enhance the support for encrypted files, this feature is expected to fail for this group of encrypted files (encrypted files that store encryption data as references).

Hopefully, I will manage to write something soon.

kevshin2 commented 8 years ago

Thanks Bo! Any idea if this will be an easy fix, combine_pdf has been working great for me so far, would love to know if a quick fix is possible before I have to move onto exploring other options. Thanks again

boazsegev commented 8 years ago

I've uploaded a fixed version, could you test it from GitHub before I release an update?

Please tell me if it works for you.

kevshin2 commented 8 years ago

Hey Bo, it's working great! Thank you so much for the update! :) @boazsegev

boazsegev commented 8 years ago

Thank you for keeping me posted :-)

kevshin2 commented 8 years ago

Please let me know when it's been released.

pvin commented 3 years ago

@kevshin2 @boazsegev I'm using version (1.0.16) and tried (1.0.21) also, but still getting this error PDF is Encrypted! Attempting to decrypt - not yet fully supported.

I'm able to open the file in preview without password.

I see this issue, which is already discussed here and closed but still getting, any help here?

boazsegev commented 3 years ago

@pvin , Do you know if the file is encrypted? If it is, CombinePDF might not be able to decrypt it.

Please note that passwords (authentication) have nothing to do with encryption, except that often both security measures are often used at the same time.