apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.53k stars 1.51k forks source link

[QUESTION] DeDRM is not working for my pdf #2083

Open Keenonthedaywalker opened 2 years ago

Keenonthedaywalker commented 2 years ago

CheckList


Title

[QUESTION] DeDRM is not working for my ACSM file

I had a acsm file that I put on Adobe Digital Editions, it was then turned into a pdf file that I put on Calibre. My problem is that the book won't convert to epub or even open in Calibre, though it does open in ADE. It is not a loaned or rented book, I own the book.

My Environment

Calibre: 5.44

DeDRM: 7.2.1

Log

tmpirfvenxx.txt ```log calibre Debug log calibre 5.44 embedded-python: True is64bit: False Windows-10-10.0.18362 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.18362') Python 3.8.5 Windows: ('10', '10.0.18362', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (7, 2, 1) calibre 5.44 embedded-python: True is64bit: False Windows-10-10.0.18362 Windows ('32bit', 'WindowsPE') 32bit process running on 64bit windows ('Windows', '10', '10.0.18362') Python 3.8.5 Windows: ('10', '10.0.18362', '', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: DeDRM (7, 2, 1) Turning on automatic hidpi scaling devicePixelRatio: 1.0 logicalDpi: 96.0 x 96.0 physicalDpi: 102.45378151260503 x 102.74157303370787 Using calibre Qt style: True [0.00] Starting up... [0.00] Showing splash screen... [1.05] splash screen shown [1.05] Initializing db... [1.05] db initialized [1.05] Constructing main UI... [2.14] main UI initialized... [2.14] Hiding splash screen Starting QuickView DeDRM v7.2.1: Trying to decrypt SILKE South African Income Tax 2022 .pdf DeDRM v7.2.1: SILKE South African Income Tax 2022 .pdf is a PDF ebook 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 [13.23] splash screen hidden [13.23] Started up in 13.23 seconds with 0 books DeDRM v7.2.1: Exception when decrypting after 1.1 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.__init__", line 487, 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 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. DeDRM v7.2.1: Failed to decrypt with new default key after 1.1 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 1.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 175, 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 1.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 432, in get_file_type_metadata File "calibre\customize\builtins.py", line 324, in get_metadata File "calibre\ebooks\metadata\pdf.py", line 124, 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: 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 Added SILKE South African Income Tax 2022 to db in: 1.1 Added 1 books in 3.0 seconds Worker Launch took: 0.03 seconds Job: 0 Convert book 1 of 1 (SILKE South African Income Tax 2022) finished Convert book 1 of 1 (SILKE South African Income Tax 2022) DeDRM v7.2.1: Trying to decrypt ns6le3np.pdf DeDRM v7.2.1: ns6le3np.pdf is a PDF ebook 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 DeDRM v7.2.1: Exception when decrypting after 1.0 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.__init__", line 487, 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 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. DeDRM v7.2.1: Failed to decrypt with new default key after 1.0 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Conversion options changed from defaults: verbose: 2 read_metadata_from_opf: 'C:\\Users\\keeno\\AppData\\Local\\Temp\\calibre_wc_4vs8f\\e9te8024.opf' output_profile: 'generic_eink' Resolved conversion options calibre version: 5.44.0 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.0, 'book_producer': None, 'change_justification': 'original', 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., " "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', " "'i')) or @class = 'chapter']", 'chapter_mark': 'pagebreak', 'comments': None, 'cover': None, 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_split_on_page_breaks': False, 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'epub_flatten': False, 'epub_inline_toc': False, 'epub_toc_at_end': False, 'epub_version': '2', 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': '', 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': , 'insert_blank_line': False, 'insert_blank_line_size': 0.5, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, 'keep_ligatures': False, 'language': None, 'level1_toc': None, 'level2_toc': None, 'level3_toc': None, 'line_height': 0.0, 'linearize_tables': False, 'margin_bottom': 5.0, 'margin_left': 5.0, 'margin_right': 5.0, 'margin_top': 5.0, 'markup_chapter_headings': True, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'new_pdf_engine': False, 'no_chapters_in_toc': False, 'no_default_epub_cover': False, 'no_images': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': , 'page_breaks_before': "//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'C:\\Users\\keeno\\AppData\\Local\\Temp\\calibre_wc_4vs8f\\e9te8024.opf', 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': '', 'search_replace': '[]', 'series': None, 'series_index': None, 'smarten_punctuation': False, 'sr1_replace': None, 'sr1_search': None, 'sr2_replace': None, 'sr2_search': None, 'sr3_replace': None, 'sr3_search': None, 'start_reading_at': None, 'subset_embedded_fonts': False, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'toc_title': None, 'transform_css_rules': '[]', 'transform_html_rules': '[]', 'unsmarten_punctuation': False, 'unwrap_factor': 0.45, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre\customize\ui.py", line 175, 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 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md DeDRM v7.2.1: Trying to decrypt ns6le3np.pdf DeDRM v7.2.1: ns6le3np.pdf is a PDF ebook DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.0 seconds Found 1 keys DeDRM v7.2.1: Trying a new default key DeDRM v7.2.1: Exception when decrypting after 0.9 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.__init__", line 487, 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 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. 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 175, 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 InputFormatPlugin: PDF Input running on C:\Users\keeno\AppData\Local\Temp\calibre_wc_4vs8f\ns6le3np.pdf Converting file to html... 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 215, in main File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "calibre\ebooks\conversion\plumber.py", line 1108, in run File "calibre\customize\conversion.py", line 242, in __call__ File "calibre\ebooks\conversion\plugins\pdf_input.py", line 51, in convert File "calibre\ebooks\pdf\pdftohtml.py", line 82, 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 iConvert book 1 of 1 (SILKE South African Income Tax 2022) DeDRM v7.2.1: Trying to decrypt ns6le3np.pdf DeDRM v7.2.1: ns6le3np.pdf is a PDF ebook 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 DeDRM v7.2.1: Exception when decrypting after 1.0 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.__init__", line 487, 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 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. DeDRM v7.2.1: Failed to decrypt with new default key after 1.0 seconds DeDRM v7.2.1: Ultimately failed to decrypt after 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md Conversion options changed from defaults: verbose: 2 read_metadata_from_opf: 'C:\\Users\\keeno\\AppData\\Local\\Temp\\calibre_wc_4vs8f\\e9te8024.opf' output_profile: 'generic_eink' Resolved conversion options calibre version: 5.44.0 {'asciiize': False, 'author_sort': None, 'authors': None, 'base_font_size': 0.0, 'book_producer': None, 'change_justification': 'original', 'chapter': "//*[((name()='h1' or name()='h2') and re:test(., " "'\\s*((chapter|book|section|part)\\s+)|((prolog|prologue|epilogue)(\\s+|$))', " "'i')) or @class = 'chapter']", 'chapter_mark': 'pagebreak', 'comments': None, 'cover': None, 'debug_pipeline': None, 'dehyphenate': True, 'delete_blank_paragraphs': True, 'disable_font_rescaling': False, 'dont_split_on_page_breaks': False, 'duplicate_links_in_toc': False, 'embed_all_fonts': False, 'embed_font_family': None, 'enable_heuristics': False, 'epub_flatten': False, 'epub_inline_toc': False, 'epub_toc_at_end': False, 'epub_version': '2', 'expand_css': False, 'extra_css': None, 'extract_to': None, 'filter_css': '', 'fix_indents': True, 'flow_size': 260, 'font_size_mapping': None, 'format_scene_breaks': True, 'html_unwrap_factor': 0.4, 'input_encoding': None, 'input_profile': , 'insert_blank_line': False, 'insert_blank_line_size': 0.5, 'insert_metadata': False, 'isbn': None, 'italicize_common_cases': True, 'keep_ligatures': False, 'language': None, 'level1_toc': None, 'level2_toc': None, 'level3_toc': None, 'line_height': 0.0, 'linearize_tables': False, 'margin_bottom': 5.0, 'margin_left': 5.0, 'margin_right': 5.0, 'margin_top': 5.0, 'markup_chapter_headings': True, 'max_toc_links': 50, 'minimum_line_height': 120.0, 'new_pdf_engine': False, 'no_chapters_in_toc': False, 'no_default_epub_cover': False, 'no_images': False, 'no_inline_navbars': False, 'no_svg_cover': False, 'output_profile': , 'page_breaks_before': "//*[name()='h1' or name()='h2']", 'prefer_metadata_cover': False, 'preserve_cover_aspect_ratio': False, 'pretty_print': True, 'pubdate': None, 'publisher': None, 'rating': None, 'read_metadata_from_opf': 'C:\\Users\\keeno\\AppData\\Local\\Temp\\calibre_wc_4vs8f\\e9te8024.opf', 'remove_fake_margins': True, 'remove_first_image': False, 'remove_paragraph_spacing': False, 'remove_paragraph_spacing_indent_size': 1.5, 'renumber_headings': True, 'replace_scene_breaks': '', 'search_replace': '[]', 'series': None, 'series_index': None, 'smarten_punctuation': False, 'sr1_replace': None, 'sr1_search': None, 'sr2_replace': None, 'sr2_search': None, 'sr3_replace': None, 'sr3_search': None, 'start_reading_at': None, 'subset_embedded_fonts': False, 'tags': None, 'timestamp': None, 'title': None, 'title_sort': None, 'toc_filter': None, 'toc_threshold': 6, 'toc_title': None, 'transform_css_rules': '[]', 'transform_html_rules': '[]', 'unsmarten_punctuation': False, 'unwrap_factor': 0.45, 'unwrap_lines': True, 'use_auto_toc': False, 'verbose': 2} Running file type plugin DeDRM failed with traceback: Traceback (most recent call last): File "calibre\customize\ui.py", line 175, 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 1.0 seconds. Read the FAQs at Harper's repository: https://github.com/apprenticeharper/DeDRM_tools/blob/master/FAQs.md DeDRM v7.2.1: Trying to decrypt ns6le3np.pdf DeDRM v7.2.1: ns6le3np.pdf is a PDF ebook DeDRM v7.2.1: Looking for new default Adobe Digital Editions Keys after 0.0 seconds Found 1 keys DeDRM v7.2.1: Trying a new default key DeDRM v7.2.1: Exception when decrypting after 0.9 seconds Traceback (most recent call last): File "calibre_plugins.dedrm.__init__", line 487, 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 1599, in initialize_ebx File "calibre_plugins.dedrm.ineptpdf", line 390, in decrypt File "Crypto\Cipher\PKCS1_v1_5.py", line 165, in decrypt ValueError: Ciphertext with incorrect length. 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 175, 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 InputFormatPlugin: PDF Input running on C:\Users\keeno\AppData\Local\Temp\calibre_wc_4vs8f\ns6le3np.pdf Converting file to html... 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 215, in main File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert File "calibre\ebooks\conversion\plumber.py", line 1108, in run File "calibre\customize\conversion.py", line 242, in __call__ File "calibre\ebooks\conversion\plugins\pdf_input.py", line 51, in convert File "calibre\ebooks\pdf\pdftohtml.py", line 82, 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 ```
ElleKayEm commented 2 years ago

You downloaded the pdf via ADE authorized with your Adobe ID on the same machine and user as calibre with DeDRM?

Try updating to noDRM's DeDRM 10.0.2: https://github.com/noDRM/DeDRM_tools

I'd also suggest using 64-bit calibre.

Keenonthedaywalker commented 2 years ago

You downloaded the pdf via ADE authorized with your Adobe ID on the same machine and user as calibre with DeDRM?

Try updating to noDRM's DeDRM 10.0.2: https://github.com/noDRM/DeDRM_tools

I'd also suggest using 64-bit calibre.

To answer your question, yes, it's on the same machine. I got sent the acsm file from a friend of mine, but I am using there adobe account to access the book.

Also I installed a new 64bit version of Calibre, but I can't install the 10.0.2 version of DeDRM as there doesn't seem to be a DeDRM_plugin.zip file in the DeDRM_Plugin folder. I did try just zipping said folder but it gives me the following error:

Capture

So I can't install the plugin.

ElleKayEm commented 2 years ago

So ADE used to download the pdf is authorized with the friend's Adobe ID? What version of ADE?

Go to the latest release at noDRM's github: https://github.com/noDRM/DeDRM_tools/releases/tag/v10.0.2

Download DeDRM_tools_10.0.2.zip. Unzip it and load DeDRM_plugin.zip.