noDRM / DeDRM_tools

DeDRM tools for ebooks
7.04k stars 314 forks source link

PDF from ADE 4.5 - through Calibre 7.8 and DeDRM 10.0.3, 10.0.9 and alpha #530

Closed eweinhold closed 5 months ago

eweinhold commented 5 months ago

Question / bug report

Unfortunately, a magazine that provides PDF via Adobe Digital Editions seems to have modified its PDF in such a way that the DeDRM plugin only decodes the pages with advertising. Of the 180 pages, only 31 pages with advertisements are still included in the final PDF. Editorial pages and the title page are missing. The missing pages are attached as blank pages, the total number of pages is correct, but all pages are blank after approx. 31 pages. It looks as if the editorial pages have been skipped and the advertising pages have been moved to the front.

Which version of Calibre are you running?

7.8 (also 7.7 was tested)

Which version of the DeDRM plugin are you running?

v10.0.9 ff

If applicable, which version of the Kindle software are you running?

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
2024-04-11 15:52:24.079 calibre-debug[4047:7682943] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
calibre Fehlerdiagnoseprotokoll
calibre 7.8  embedded-python: True
macOS-14.4.1-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '23.4.0', 'Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112')
Python 3.11.5
OSX: ('14.4.1', ('', '', ''), 'arm64')
Interface language: de
EXE path: /Applications/calibre.app/Contents/MacOS/calibre-debug
Successfully initialized third party plugins: DeDRM (10, 0, 9)
calibre 7.8  embedded-python: True
macOS-14.4.1-arm64-arm-64bit Darwin ('64bit', '')
('Darwin', '23.4.0', 'Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112')
Python 3.11.5
OSX: ('14.4.1', ('', '', ''), 'arm64')
Interface language: de
EXE path: /Applications/calibre.app/Contents/MacOS/calibre-debug
Successfully initialized third party plugins: DeDRM (10, 0, 9)
QPA platform: cocoa
devicePixelRatio: 2.0
logicalDpi: 72.0 x 72.0
physicalDpi: 128.5000019298764 x 128.5000019298764
[0.00] Starting up...
[0.01] Showing splash screen...
[0.15] splash screen shown
[0.15] Initializing db...
[0.15] db initialized
[0.15] Constructing main UI...
[0.39] GUI main window shown
[0.41] main UI initialized...
[0.41] Hiding splash screen
DeDRM v10.0.9: Trying to decrypt this.pdf
DeDRM v10.0.9: this.pdf is a PDF ebook with encryption EBX_HANDLER
DeDRM v10.0.9: this.pdf is a PDF ebook (EBX) for UUID KEY
DeDRM v10.0.9: Trying UUID-matched encryption key default_ade_key_uuid_KEX
DeDRM v10.0.9: Decrypted with key default_ade_key_uuid_KEY after 0.8 seconds
DeDRM v10.0.9: Finished after 0.8 seconds
[8.31] splash screen hidden
[8.31] Started up in 8.31 seconds with 0 books
Added this to db in: 0.0
Added 1 books in 1.2 seconds
ElleKayEm commented 5 months ago

How are you viewing the decrypted pdf? Don't use calibre's ebook viewer for pdfs.

eweinhold commented 5 months ago

How are you viewing the decrypted pdf? Don't use calibre's ebook viewer for pdfs.

OH! You hit a spot. The Pages are only missing on Mac Quickview and Safari.

Adobe Reader claims the PDF is broken and doesn't open it.

But Firefox renders the PDF correct. i have thrown that pdf onto an online pdf converter and the new pdf contains all pages...

so they did something to the pdf to make it look broken?!

pdfunite this.pdf that2.pdf

that fixes the PDF to render fine again in quick view and Safari

ElleKayEm commented 5 months ago

Maybe something in the original is made to work specifically with ADE. Firefox knows how to handle that too (or knows what to ignore). And the conversion made it into a standard pdf. That's my guess.

eweinhold commented 5 months ago

They did 100% something to that PDF to render only the pages with advertising and skip the rest ... Maybe it would be nice to fix / catch that $thing they did for the output of the plugin but ....

My hot fix is the pdfunife rewrite of that pdf which is as fast as the diskspeed and with zero visible quality loss. Text is still vector not images so....

So I guess this is not directly a problem for the plugin so I think -

this issue can be closed.

ElleKayEm commented 5 months ago

Maybe not so much advertising vs other content but whole page image scans vs text or text and seperate images?

The plugin is only going to remove DRM.

If you're all set, you can close the issue.