Closed UserXYZ closed 6 years ago
thanks for the information. Unfortunately, the fix will be partial, because PYPdf2 supports only algorithms 1 and 2. AES encrytped files will not be opened and I can do nothing about it.
Hmmm, I don't think that's the problem here...from the error it seams if a popup window that would request a password to be entered is not created (I am sure it does not show) because of this attribute error... Can you test that, regardless of the encrypting method used in the pdf file itself? You could use some regular pdf, create a password protected copy of it, with the supported cypher, and see if pdfbooklet shows "enter the password" popup...if it does, then it's a matter of implementing a check of the used encryption version and give the appropriate error popup if used version of encryption is not supported.
I didn't say it was the problem you encountered, it comes from a bug due to the migration of some functions in the TextOnly class. There was really a bug, and I fixed it already (not yet uploaded on Github because the present version is unstable). But I verified that this allows opening old encrypting methods, the new ones raise the following error :
File "D:\Mes Documents\en cours\PdfBooklet3\PyPDF2_G\pdf.py", line 1982, in _decrypt
raise NotImplementedError("only algorithm code 1 and 2 are supported")
NotImplementedError: only algorithm code 1 and 2 are supported
I fixed it in master (with the above indicated limitations).
warnings when starting pdfbooklet:
and an error when opening password protected file:
This error is a big one, it should be corrected firstly...