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 11-13-2023, 11:42 AM   #391
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Functioning as designed, actually.

The checkboxes are for adding to the lines you have selected (and are turned blue). It's intended for users wanting to always include some of the front/end matter while using the normal (blue) select to choose for each individual split book.

If you don't need that feature, you can disable it to avoid confusion. The EpubSplit dialog has a Configure button for convenience.
JimmXinu is offline   Reply With Quote
Old 11-13-2023, 12:10 PM   #392
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I have been using it wrong accidentally all this time
theducks is offline   Reply With Quote
Advert
Old 02-10-2024, 10:41 AM   #393
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Encrypted fonts, broken after split

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 )
Attached Files
File Type: xml encryption.xml (580 Bytes, 15 views)
theducks is offline   Reply With Quote
Old 02-10-2024, 10:51 AM   #394
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
I have no idea what's in the source epub, let alone what's missing when split.

EpubSplit already copies over a number of different font file types. It should be possible to add more, if they can be identified:
Spoiler:
Code:
        ## always include font files for embedded fonts
        for key, value in six.iteritems(self.manifest_items):
            #print("manifest:%s %s"%(key,value))
            if key.startswith('i:') and value[1] in ('application/vnd.ms-opentype',
                                                     'application/x-font-ttf',
                                                     'application/x-font-truetype',
                                                     'application/font-sfnt'):
                self.add_linked_file(value[0])

Can you ScrambleEbook the source epub for me to look at?
JimmXinu is offline   Reply With Quote
Old 02-10-2024, 11:08 AM   #395
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
It is a TTF
(<item id="id1" href="fonts/00017.ttf" media-type="application/x-font-truetype"/>)

But I think I spotted something (attached) in the full EPUB (it is 3.3M, which is why I did not scramble) . I tried a normal Add files (the font is there) and that does not put it in the META-INF (AFAIK split does not even try)
Attached Thumbnails
Click image for larger version

Name:	encrypted.JPG
Views:	22
Size:	13.3 KB
ID:	206288  
theducks is offline   Reply With Quote
Advert
Old 02-10-2024, 11:30 AM   #396
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
I thought you said copying the encryption.xml file over didn't help? Does it work if it's in META-INF?

I'm not opposed to trying to copy over that file, but before you said copying it over didn't work...
JimmXinu is offline   Reply With Quote
Old 02-10-2024, 12:41 PM   #397
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,900
Karma: 55267620
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 JimmXinu View Post
I thought you said copying the encryption.xml file over didn't help? Does it work if it's in META-INF?

I'm not opposed to trying to copy over that file, but before you said copying it over didn't work...
I used the editor File Add. That did put it into META-INF , but it still did not work (when I open the Editor again).
Code:
calibre, version 7.5.1
ERROR: Failed to open book: Failed to open book, it has obfuscated fonts, but the obfuscation key is missing from the OPF. Do an EPUB to EPUB conversion before trying to edit this book.
But I can't see that in the source EPUB (and it works: attached)
Attached Files
File Type: opf content.opf (35.0 KB, 24 views)
theducks is offline   Reply With Quote
Old 02-10-2024, 01:18 PM   #398
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,532
Karma: 84500001
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
One thing to check is that splitting the EPUB did not change the identifiers in the OPF, specifically the one pointed to by unique-identifier in the package element. That identifier is used as the encryption key for font obfuscation.
jhowell is offline   Reply With Quote
Old 02-10-2024, 02:02 PM   #399
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
EpubSplit does set the identifier in content.opf. Since it's meant to be unique and all.
Example:
Code:
<?xml version="1.0" ?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="epubsplit-id">
   <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
      <dc:identifier id="epubsplit-id">epubsplit-uid-1707591258</dc:identifier>
But that could be (optionally?) copied from the source.

theducks, I'm still confused. You seem to be saying that you don't know how to make the split book work with encrypted fonts?

If you can't tell me exactly what needs to be copied/changed, and you can't share a source epub (or a scrambled version) so I can try to figure it out, I'm not going to be able to help you.
JimmXinu is offline   Reply With Quote
Old 02-10-2024, 02:47 PM   #400
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
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
Moderator Notice
attached epub removed as requested -- Jimm

Last edited by JimmXinu; 02-10-2024 at 03:36 PM.
theducks is offline   Reply With Quote
Old 02-10-2024, 05:14 PM   #401
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Okay, it looks like:
  1. EpubSplit is copying the encrypted TTF file from the source, exactly as it is in the source epub.
  2. For the split epub to use that TTF file, it needs the META-INF/encryption.xml file and the same <dc:identifier ...> value, as jhowell pointed out.
The exact problem, for me at least, was initially being masked by the fact that Calibre's Edit book automatically decrypts the TTF file when you open the epub and re-encrypts it again on save. (The older Explode book tool does not do that, BTW.)

Which leads to a couple interesting work arounds:
  • You can copy the TTF file from the source epub while in Edit book because it's already decrypted at that point.
  • You can delete META-INF/encryption.xml from the epub while in Edit book and when you save the epub, it won't re-encrypt the TTF file again. Splits after that are fine.

Clearly, Calibre knows how to decrypt the TTF file. The question then is whether EpubSplit should:
  1. Copy the encryption.xml file and unique-id value.
  2. Decrypt the TTF file like Edit book does, leaving it decrypted.
  3. Re-encrypt the TTF file to the new unique-id value.
  4. Do nothing and refer users to the work arounds above. Will DeDRM do anything about encrypted fonts?

I also have to consider what, if anything, should be done with EpubMerge about this. Multiple merged epubs will have different encryption.xml file and unique-id values.

While I think about think it, see the work arounds above.
JimmXinu is offline   Reply With Quote
Old 02-10-2024, 05:44 PM   #402
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A

(And I am glad you figured it out. I had no clue)
I am going to keep your suggested work around notes handy the next time it shows.
And I am sorry for opening the EPUB Merge can-o-worms
theducks is offline   Reply With Quote
Old 02-11-2024, 07:53 AM   #403
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,387
Karma: 87013929
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Will DeDRM do anything about encrypted fonts?
I doubt it, but I don't know. I also doubt any Kindle mobi/azw or azw3/KF8 uses them.
I suppose an epub with Adobe DRM might.
Quoth is offline   Reply With Quote
Old 02-11-2024, 08:19 AM   #404
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,900
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Those books were part of a Amazon boxed set that I 'cleaned' so I could convert. Not the first time I have run into this, just got round-tuit in reporting.
theducks is offline   Reply With Quote
Old 02-11-2024, 10:16 AM   #405
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,366
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by Quoth View Post
I doubt it, but I don't know. I also doubt any Kindle mobi/azw or azw3/KF8 uses them.
I suppose an epub with Adobe DRM might.
An epub->azw3 convert, the font file is left decrypted and there's not encryption.xml file.

Doing an epub->epub convert, the font file is still encrypted (or encrypted again).

Using DeDRM plugin and adding the epub to a library--if there's a way to invoke DeDRM other than file import I don't know it--the encryption on the TTF file is removed.

theducks - Did you need to DeDRM the original (prescrambled) epub? Can you confirm with the original epub that DeDRM removes the font encryption?
JimmXinu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 494 05-18-2024 02:34 AM
[GUI Plugin] EpubMerge JimmXinu Plugins 519 04-01-2024 10:25 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 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 05:58 AM.


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