apprenticeharper / DeDRM_tools

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

PDF from Digital Editions 2.0.1 Won't Import #1816

Open DXCanas opened 3 years ago

DXCanas commented 3 years ago

CheckList


Title

Book was purchased, opens fine in DE. Just won't go through the DeDRM process.

My Environment

Calibre: 5.18.0

DeDRM: 7.2.1

Log

Error Log ```log calibre, version 5.18.0 ERROR: Loading book failed: Failed to open the book at C:\Private\File\Path\PDF - Unknown.pdf. Click "Show details" for more info. Failed to convert book: C:\Private\File\Path\PDF - Unknown.pdf with error: DeDRM v7.2.1: Trying to decrypt Called by the Gospel - Unknown.pdf DeDRM v7.2.1: Called by the Gospel - Unknown.pdf is a PDF ebook DeDRM v7.2.1: Trying Encryption key default_key error writing pdf: max() arg is an empty sequence DeDRM v7.2.1: Failed to decrypt with key default_key after 0.1 seconds DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.1 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.2 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Syntax Error: Couldn't find the 'EBX_HANDLER' security handler pdfinfo errored out with return code: 1 InputFormatPlugin: PDF Input running on C:\Private\File\Path\PDF - Unknown.pdf Failed to run pipe worker with command: from calibre.srv.render_book import viewer_main; viewer_main() Traceback (most recent call last): File "calibre\customize\ui.py", line 433, in get_file_type_metadata File "calibre\customize\builtins.py", line 346, in get_metadata File "calibre\ebooks\metadata\pdf.py", line 126, in get_metadata ValueError: Could not read info dict from PDF 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.2 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Traceback (most recent call last): File "runpy.py", line 194, in _run_module_as_main File "runpy.py", line 87, in _run_code File "site.py", line 82, in File "site.py", line 77, in main File "site.py", line 49, in run_entry_point File "calibre\utils\ipc\worker.py", line 197, in main File "", line 1, in File "calibre\srv\render_book.py", line 824, in viewer_main File "calibre\srv\render_book.py", line 815, in render_for_viewer File "calibre\srv\render_book.py", line 792, in render File "calibre\ebooks\oeb\iterator\book.py", line 63, in extract_book File "calibre\customize\conversion.py", line 245, in __call__ File "calibre\ebooks\conversion\plugins\pdf_input.py", line 54, in convert File "calibre\ebooks\pdf\pdftohtml.py", line 83, in pdftohtml calibre.ebooks.ConversionError: pdftohtml failed with return code: 1 Syntax Error: Couldn't find the 'EBX_HANDLER' security handler Exception ignored in: Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 268, in __del__ TypeError: 'NoneType' object is not callable Exception ignored in: Traceback (most recent call last): File "calibre_plugins.dedrm.adobekey", line 268, in __del__ TypeError: 'NoneType' object is not callable```
DXCanas commented 3 years ago

Was able to work around this with the information found in #1692

But leaving the ticket here, as the most recent combination of plugin and tool aren't working.

daneelf commented 3 years ago

I was able to remove DRM from epub with the solution suggested here: https://github.com/apprenticeharper/DeDRM_tools/issues/1692