apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.55k stars 1.52k forks source link

Problem with PDF drm removal from adobe digital edition #1728

Open edumandrade opened 3 years ago

edumandrade commented 3 years ago

calibre Debug log calibre 5.21 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 39, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 39, 0) && KFX metadata reader (from KFX Input) (1, 39, 0) && KFX Input (1, 39, 0) && Set KFX metadata (from KFX Output) (1, 52, 0) && KFX Output (1, 52, 0) && KindleUnpack - The Plugin (0, 83, 0) && Obok DeDRM (7, 2, 1) calibre 5.21 embedded-python: True is64bit: False Windows-10-10.0.19041 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.19041') Python 3.8.5 Windows: ('10', '10.0.19041', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 39, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 39, 0) && KFX metadata reader (from KFX Input) (1, 39, 0) && KFX Input (1, 39, 0) && Set KFX metadata (from KFX Output) (1, 52, 0) && KFX Output (1, 52, 0) && KindleUnpack - The Plugin (0, 83, 0) && Obok DeDRM (7, 2, 1) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 120.0 x 120.0 physicalDpi: 165.87755102040816 x 166.25454545454545 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [1.31] splash screen shown [1.31] Initializing db... [1.36] db initialized [1.36] Constructing main UI... DEBUG: 0.0 obok::utilities.py - loading translations DEBUG: 0.0 obok::dialogs.py - loading translations DEBUG: 0.0 obok::config.py - loading translations DEBUG: 0.1 obok::action_err.py - loading translations [3.34] main UI initialized... [3.34] Hiding splash screen Starting QuickView DeDRM v7.2.1: Trying to decrypt Jacques Derrida and the Challenge of History.pdf DeDRM v7.2.1: Jacques Derrida and the Challenge of History.pdf is a PDF ebook DeDRM v7.2.1: Trying Encryption key default_key [39.53] splash screen hidden [39.53] Started up in 39.53 seconds with 179 books DeDRM v7.2.1: Exception when decrypting after 0.5 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.init", line 436, in PDFDecrypt File "calibre_plugins.dedrm.ineptpdf", line 2178, in decryptBook File "calibre_plugins.dedrm.ineptpdf", line 1984, in init File "calibre_plugins.dedrm.ineptpdf", line 1469, in initialize File "calibre_plugins.dedrm.ineptpdf", line 1602, in initialize_ebx TypeError: object of type 'int' has no len() DeDRM v7.2.1: Failed to decrypt with key default_key after 0.5 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.7 seconds DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.7 seconds Found 1 keys 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.9 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 0.9 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 176, in _run_filetype_plugins File "calibre_plugins.dedrm.init", line 640, in run File "calibre_plugins.dedrm.init", line 515, in PDFDecrypt calibre_plugins.dedrm.DeDRMError: DeDRM v7.2.1: Ultimately failed to decrypt after 0.9 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 433, 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

pdfinfo errored out with return code: 1 Exception ignored in: <function NativeFunction.del at 0x07CDC730> Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 268, in del TypeError: 'NoneType' object is not callable Exception ignored in: <function NativeFunction.del at 0x07CDC730> Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 268, in del TypeError: 'NoneType' objAdded Jacques Derrida and the Challenge of History to db in: 0.2 Added 1 books in 5.8 seconds

ElleKayEm commented 3 years ago

DeDRM 7.2.1 still has problems with some pdfs. Try with calibre 4.23 and DeDRM 6.8.1. I also recommend using 64-bit calibre.

countalmaviva commented 3 years ago

DeDRM 7.2.1 still has problems with some pdfs. Try with calibre 4.23 and DeDRM 6.8.1. I also recommend using 64-bit calibre.

@ElleKayEm Thank you for mentioning this. Your suggestion worked like a charm on a stubborn pdf. Do you think it would be helpful for me to send the pdf to the dev?

Now I wondering what I lost when I downgraded my calibre installation...

perfect-hot-girl commented 3 years ago

@ElleKayEm Thank you! This worked for me as well. 🤍

ElleKayEm commented 3 years ago

@countalmaviva Yes, that could be helpful if it is one that won't decrypt with 7.2.1 but does with 6.8.1. You can send the original encrypted book and your key exported from the DeDRM 6.8.1 preferences to apprenticeharper@gmail.com.

countalmaviva commented 3 years ago

Done!

tibers commented 3 years ago

I came here to post an issue but now I just want to bump this one. Installing the old version of Caliber and the old version of the DeDRM tools got me over the hump also.