Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2024, 11:17 AM   #406
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I dedrm'd the AZW file I downloaded (transfer by USB method for my K4). I then converted to EPUB as my Kobo is my daily reader
theducks is online now   Reply With Quote
Old 02-11-2024, 11:23 AM   #407
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
I have been splitting a number of Amazon Boxed sets and noticed that once split, the fonts fail the check in the Calibre Editor (The EPUB source is still OK)
I tried copying (adding) the missing encryption.xml from the source (attached. The path matches).
No Joy. Is there another entry needed (and can the PI do this in the future )
Until this is fixed, there is Then a work around. Open the ePub in Sigil and remove the font encryption.
JSWolf is offline   Reply With Quote
Advert
Old 02-11-2024, 11:24 AM   #408
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Even weirder. I went to scramble the split output (using scramble plugin) book
and
Code:
calibre, version 7.5.1
ERROR: ScrambleEbook [v0.6.0]: Source ebook must be de-DRM'd and in one of these formats:
- azw3
- epub
- kepub
- kepub.epub.

Please select another.
I can View the (split) book in Calibre.
It does split. Just fails the font (shows red shield until I added the encryption.xhtml), then it fails to load in the editor the next time
I just ran Scramble on the full Calibre Converted to EPUB (from AZW3) and that ran.

I will attach the scrambled source. Let me know, and I (or you can) remove it after you have grabbed it

attached epub removed as requested -- Jimm
Try opening the eBook in the editor. DeDRM will remove the DRM so the eBook can be viewed. But it won't remove the DRM for the editor.
JSWolf is offline   Reply With Quote
Old 02-11-2024, 12:03 PM   #409
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by theducks View Post
I dedrm'd the AZW file I downloaded (transfer by USB method for my K4). I then converted to EPUB as my Kobo is my daily reader
Seems a bit odd that DeDRM would decrypt the content but leave then font 'encrypted'. Especially as DeDRM will decrypt the font when the epub is added.

So odd, in fact, that I invested the princely sum of 99¢ to buy the book from Amazon to try it out myself.

When I import the AZW3 file (using 'Download & USB Transfer' option for my Kindle Paperwhite), DeDRM(10.0.3) gives me a decrypted AZW3 and when I use Calibre to convert that to epub, the TTF file inside is not encrypted.

And just for completeness, I used EpubSplit on that epub and the result also has the font file unencrypted and working...

UPDATE:

I just downloaded some other ebooks from Amazon, imported, DeDRMed, converted to epub and those do appear to have encrypted fonts. So I'm not sure what's going on here yet.

Last edited by JimmXinu; 02-11-2024 at 12:16 PM.
JimmXinu is offline   Reply With Quote
Old 02-11-2024, 01:20 PM   #410
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
More update. What I'm seeing is that the DeDRM'ed AZW3 file had decrypted fonts in it (as seen with Explode book).

Calibre Convert is encrypting them when converting to epub. I don't know why it would do that, but I can see it as one of the last steps in the conversion process. I've not found any setting to tell Calibre to not do that. Nor do I see anything in the exploded AZW3 to suggest it should.

In fact, I went and downloaded a TTF font file, added it to an AZW3 file that didn't previously have any fonts and when I converted to epub, Convert encrypted that font.

I even took an epub with unencrypted font file and did epub->epub convert. Output epub also had encrypted font file.

So it looks to me like Calibre is encrypting all embedded fonts when converting to epub. Is that intended behavior, I wonder?

(FYI, there's a checkbox setting in DeDRM plugin for 'Deobfuscate EPUB Fonts'. I assume it's on by default.)
JimmXinu is offline   Reply With Quote
Advert
Old 02-11-2024, 02:36 PM   #411
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Yet More Update:

For whatever reason, the azw3 file from Amazon I got for theduck's originally reported book did not mark its font file as encrypted. In fact, the entire file downloaded unencumbered by DRM.

A couple azw3s that I downloaded do contain 'encrypted' font files.

Looking at the calibre code, there is an 'encrypted' flag in azw3 for font files, although I don't see any actual decrypting happening.

So apparently Calibre is just honoring that flag on conversion and encrypting the fonts on output.

I don't know why my constructed azw3 with a "100% free" font still comes through flagged encrypted.

All of this is just documenting my research as I try to decide whether I want my epub plugins to decrypt(/re-encrypt) font files or declare it the users' problem.
JimmXinu is offline   Reply With Quote
Old 02-11-2024, 05:35 PM   #412
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2024-02-11
- Update Translations
- Decrypt encrypted/obfuscated font files.

Okay, it turns out Calibre Convert has been 'preserving font encryption' for nearly 15 years. So I'm not going to argue that's wrong at this point.

This version decrypts the font files, but it doesn't make any attempt to re-encrypt them again in the split epubs. I just don't see the point.

There are, in fact, two different 'encryptions' used, according to the Calibre code. I've carried over the implementation for both, but I only have one to test with. FYI.

Last edited by JimmXinu; 04-01-2024 at 10:34 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 03-26-2024, 10:14 AM   #413
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2024-02-11

- Update Translations
- Speed up optimization from haowjy #9

I promptly forgot about the last update when I didn't get a confirmation that it fixed the problem.

Feel free to post a reminder if I forget about this for a month, too.

Last edited by JimmXinu; 04-01-2024 at 10:33 AM. Reason: remove obsolete test version
JimmXinu is offline   Reply With Quote
Old 04-01-2024, 10:33 AM   #414
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 3.6.0 - 2024-04-01
- Update translations, change translation limit to 10%
- Decrypt obfuscated font files during split.
- Speed up get_split_files by using existing split_lines data #9
JimmXinu is offline   Reply With Quote
Old 04-06-2024, 11:09 AM   #415
iupiter
Member
iupiter began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Sep 2022
Device: Pocketbook Inkpad Color
why is it not possible to split epub 3 files directly?
iupiter is offline   Reply With Quote
Old 04-06-2024, 11:38 AM   #416
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by iupiter View Post
why is it not possible to split epub 3 files directly?
I ran into this also. It had me puzzled.

I think it is because of the containerization (is that the proper description)
A simple LOOKING heading, may be 7 layers deep in Divs
Code:
<div class="heading1">

      <div class="heading-contents1">

        <div class="element">

          <div class="element">

            <h1 class="element-title1" id="calibre_pb_0">1</h1>

          </div>

        </div>

        <div class="element">

          <h2 class="element-subtitle" id="calibre_pb_1">THE PHOENICIA HOTEL, MALTA, EARTH</h2>

        </div>

        <div class="heading-image-block">

          <div class="heading-image-size-container">

            <img src="../images/00004.jpeg" alt="" class="heading-image-image" data-amznremoved="mobi7"/>

            <img height="120" alt="" class="heading-image-image1" src="../images/00003.jpeg" width="120" data-amznremoved-m8="true"/>

          </div>

        </div>

      </div>

    </div>
All that for 3 lines (includes an image)


Did I guess the why correct?
theducks is online now   Reply With Quote
Old 04-06-2024, 09:44 PM   #417
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
A combination of factors.
  • I didn't have many sources for examples of epub3 documents at the time.
  • Epub3 has more complex ToC tags, for example, epub3 can put images in ToC. I'm not sure what theducks' example above is, some quick research appears to show epub3 ToC have to be <ol> <li> tags.
  • Lack of examples where epub3 is substantively better than the equivalent epub2.
  • And my lack of motivation to support both epub2 and epub3 natively.
To quote myself from several years ago:
Quote:
Originally Posted by JimmXinu View Post

The funny thing about EpubSplit is I made it primarily to fulfill my sense of symmetry after making EpubMerge. I very rarely use it myself. Calibre's Edit Book feature didn't exist at the time I created EpubSplit. If it had, I doubt I would have made EpubSplit.
JimmXinu is offline   Reply With Quote
Old 04-06-2024, 11:38 PM   #418
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,464
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Theduck's example looks like a calibre conversion of a Vellum generated ebook and is showing a chapter header not a ToC entry. One big clue is the existence of the higher resolution image for KF8/azw3 and the low res image for .mobi with the image size in pixels and the data-amznremoved- tags.
DNSB is offline   Reply With Quote
Old 04-07-2024, 06:59 AM   #419
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DNSB View Post
Theduck's example looks like a calibre conversion of a Vellum generated ebook and is showing a chapter header <snip> .
Exactly. (I seem to buy a lot of books that use that )

I have to clean the CSS (comment out) of Letter_spacing because both my Kobo's do not do it correctly for KPUB.

Chapter Twenty displays as ChapterTwenty (the space of any kind, is incorrectly shrunk)
I also shrink the vertical space (160 down to 70 ) on the books Title page (not the Calibre titlepage) to prevent that page splitting due to massive use of whitespace.
theducks is online now   Reply With Quote
Old 04-07-2024, 10:33 AM   #420
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,328
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Ah, so your point was about the ToC entry aiming at the id="calibre_pb_1" tag and EpubSplit having to do weird things to split at that point?

True, but I don't think that point is specific to epub3.
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] EpubMerge JimmXinu Plugins 522 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
[GUI Plugin] FanFictionDownLoader JimmXinu Plugins 3985 05-08-2015 11:18 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 02:45 AM.


MobileRead.com is a privately owned, operated and funded community.