CheckList
[Bug] Plugin chooses wrong decryption key for PDF
I'm adding a PDF to Calibre. The modifications in #1689 are included so PDFs even work.
I have multiple different ADE keys imported into the plugin, with the "correct" one for this PDF being the last one in that list.
However, the plugin seems to think that the very first key it tries to use is correct. Probably, just by chance, decryption with that wrong key leads to a file that at least looks like it could be a valid PDF. Though, actually, it results in a PDF with all pages empty.
When I delete all the other keys from the plugin settings so only the correct key is left, the plugin correctly decrypts the book.
My Environment
Calibre: 5.28
Kindle: N/A
DeDRM: 7.2.1 plus PR #1689
Log
Log Title
DeDRM v7.0.3: Trying to decrypt mzgibmyn.pdf
DeDRM v7.0.3: mzgibmyn.pdf is a PDF ebook
DeDRM v7.0.3: Trying Encryption key key1
DeDRM v7.0.3: Finished after 0.8 seconds
Traceback (most recent call last):
File "calibre/customize/ui.py", line 433, in get_file_type_metadata
File "calibre/customize/builtins.py", line 318, in get_metadata
File "calibre/ebooks/metadata/pdf.py", line 126, in get_metadata
ValueError: Could not read info dict from PDF
pdfinfo returned no UTF-8 data
Added Book to db in: 0.8
Added 1 books in 22.0 seconds
(That "key1" that it tried to use is definitely, 100%, the wrong key for that book).
CheckList
The Titleand TheLog Titleare setted correctly.my environment.the log.[Bug] Plugin chooses wrong decryption key for PDF
I'm adding a PDF to Calibre. The modifications in #1689 are included so PDFs even work.
I have multiple different ADE keys imported into the plugin, with the "correct" one for this PDF being the last one in that list.
However, the plugin seems to think that the very first key it tries to use is correct. Probably, just by chance, decryption with that wrong key leads to a file that at least looks like it could be a valid PDF. Though, actually, it results in a PDF with all pages empty.
When I delete all the other keys from the plugin settings so only the correct key is left, the plugin correctly decrypts the book.
My Environment
Calibre: 5.28
Kindle: N/A
DeDRM: 7.2.1 plus PR #1689
Log
Log Title
(That "key1" that it tried to use is definitely, 100%, the wrong key for that book).