I've just imported an encrypted pdf of an eMagazin and it runs into an error. Other encrypted pdfs just work fine!
Here's the log:
calibre 5.14 embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.3.0', 'Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: de
Successfully initialized third party plugins: DeDRM (7, 2, 1) && EpubMerge (2, 11, 0)
calibre 5.14 embedded-python: True is64bit: True
macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.3.0', 'Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101')
Python 3.8.5
OSX: ('10.16', ('', '', ''), 'x86_64')
Interface language: de
Successfully initialized third party plugins: DeDRM (7, 2, 1)
devicePixelRatio: 1.0
logicalDpi: 72.0 x 72.0
physicalDpi: 94.00000141173837 x 92.0000013817014
Using calibre Qt style: False
[0.00] Starting up...
[0.01] Showing splash screen...
[0.21] splash screen shown
[0.21] Initializing db...
[0.47] db initialized
[0.47] Constructing main UI...
[1.46] main UI initialized...
[1.46] Hiding splash screen
[1.47] splash screen hidden
[1.47] Started up in 1.47 seconds with 8984 books
Starting QuickView
DeDRM v7.2.1: Trying to decrypt Mac & i kompakt Software-Entwicklung.pdf
DeDRM v7.2.1: Mac & i kompakt Software-Entwicklung.pdf is a PDF ebook
DeDRM v7.2.1: Trying Encryption key default_key
DeDRM v7.2.1: Exception when decrypting after 0.1 seconds
Traceback (most recent call last):
File "calibre_plugins.dedrm.init", line 436, in PDFDecrypt
result = ineptpdf.decryptBook(userkey, path_to_ebook, of.name)
File "calibre_plugins.dedrm.ineptpdf", line 2178, in decryptBook
serializer = PDFSerializer(inf, userkey)
File "calibre_plugins.dedrm.ineptpdf", line 1984, in init
doc.initialize(userkey)
File "calibre_plugins.dedrm.ineptpdf", line 1469, in initialize
return self.initialize_ebx(password, docid, param)
File "calibre_plugins.dedrm.ineptpdf", line 1599, in initialize_ebx
bookkey = rsa.decrypt(bookkey)
File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt
return _PKCS1_v1_5.new(self._rsa).decrypt(data, 172)
File "Crypto/Cipher/PKCS1_v1_5.py", line 169, in decrypt
File "Crypto/PublicKey/RSA.py", line 152, in _decrypt
ValueError: Ciphertext too large
DeDRM v7.2.1: Failed to decrypt with key default_key after 0.1 seconds
DeDRM v7.2.1: Trying Encryption key default_key_2
error writing pdf: max() arg is an empty sequence
DeDRM v7.2.1: Failed to decrypt with key default_key_2 after 0.1 seconds
DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.1 seconds
DeDRM v7.2.1: Trying a new default key
error writing pdf: max() arg is an empty sequence
DeDRM v7.2.1: Failed to decrypt with new default key after 0.1 seconds
DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
File "calibre/customize/ui.py", line 172, in _run_filetype_plugins
File "calibre_plugins.dedrm.init", line 640, in run
decrypted_ebook = self.PDFDecrypt(path_to_ebook)
File "calibre_plugins.dedrm.init", line 515, in PDFDecrypt
raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime))
calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md
Traceback (most recent call last):
File "calibre/customize/ui.py", line 428, in get_file_type_metadata
File "calibre/customize/builtins.py", line 347, in get_metadata
File "calibre/ebooks/metadata/pdf.py", line 126, in get_metadata
ValueError: Could not read info dict from PDF
Syntax Error: Couldn't find the 'EBX_HANDLER' security handler
Hello,
I've just imported an encrypted pdf of an eMagazin and it runs into an error. Other encrypted pdfs just work fine! Here's the log:
calibre 5.14 embedded-python: True is64bit: True macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '20.3.0', 'Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101') Python 3.8.5 OSX: ('10.16', ('', '', ''), 'x86_64') Interface language: de Successfully initialized third party plugins: DeDRM (7, 2, 1) && EpubMerge (2, 11, 0) calibre 5.14 embedded-python: True is64bit: True macOS-10.16-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '20.3.0', 'Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101') Python 3.8.5 OSX: ('10.16', ('', '', ''), 'x86_64') Interface language: de Successfully initialized third party plugins: DeDRM (7, 2, 1) devicePixelRatio: 1.0 logicalDpi: 72.0 x 72.0 physicalDpi: 94.00000141173837 x 92.0000013817014 Using calibre Qt style: False [0.00] Starting up... [0.01] Showing splash screen... [0.21] splash screen shown [0.21] Initializing db... [0.47] db initialized [0.47] Constructing main UI... [1.46] main UI initialized... [1.46] Hiding splash screen [1.47] splash screen hidden [1.47] Started up in 1.47 seconds with 8984 books Starting QuickView DeDRM v7.2.1: Trying to decrypt Mac & i kompakt Software-Entwicklung.pdf DeDRM v7.2.1: Mac & i kompakt Software-Entwicklung.pdf is a PDF ebook DeDRM v7.2.1: Trying Encryption key default_key DeDRM v7.2.1: Exception when decrypting after 0.1 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 436, in PDFDecrypt result = ineptpdf.decryptBook(userkey, path_to_ebook, of.name) File "calibre_plugins.dedrm.ineptpdf", line 2178, in decryptBook serializer = PDFSerializer(inf, userkey) File "calibre_plugins.dedrm.ineptpdf", line 1984, in init doc.initialize(userkey) File "calibre_plugins.dedrm.ineptpdf", line 1469, in initialize return self.initialize_ebx(password, docid, param) File "calibre_plugins.dedrm.ineptpdf", line 1599, in initialize_ebx bookkey = rsa.decrypt(bookkey) File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt return _PKCS1_v1_5.new(self._rsa).decrypt(data, 172) File "Crypto/Cipher/PKCS1_v1_5.py", line 169, in decrypt File "Crypto/PublicKey/RSA.py", line 152, in _decrypt ValueError: Ciphertext too large DeDRM v7.2.1: Failed to decrypt with key default_key after 0.1 seconds DeDRM v7.2.1: Trying Encryption key default_key_2 error writing pdf: max() arg is an empty sequence DeDRM v7.2.1: Failed to decrypt with key default_key_2 after 0.1 seconds DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.1 seconds DeDRM v7.2.1: Trying a new default key error writing pdf: max() arg is an empty sequence DeDRM v7.2.1: Failed to decrypt with new default key after 0.1 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre/customize/ui.py", line 172, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 640, in run decrypted_ebook = self.PDFDecrypt(path_to_ebook) File "calibre_plugins.dedrm.init", line 515, in PDFDecrypt raise DeDRMError("{0} v{1}: Ultimately failed to decrypt after {2:.1f} seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md".format(PLUGIN_NAME, PLUGIN_VERSION, time.time()-self.starttime)) calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.1 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Traceback (most recent call last): File "calibre/customize/ui.py", line 428, in get_file_type_metadata File "calibre/customize/builtins.py", line 347, in get_metadata File "calibre/ebooks/metadata/pdf.py", line 126, in get_metadata ValueError: Could not read info dict from PDF Syntax Error: Couldn't find the 'EBX_HANDLER' security handler