Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-27-2022, 10:06 PM   #1
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
"Upgrade Book Internals" Adds encryption.xml

As an experiment to see if there's any downside to switching to epub3, I went to Tools > Upgrade Book Internals in the Editor and converted an epub2 book over to epub3. The only odd thing I see is that the conversion process added an encryption.xml file under Miscellaneous. It looks like it's for previously hidden fonts (see below). Normally, when I mess with a book's html, I get rid of all the embedded fonts. Since these appeared in that file (and appear encrypted (I guess?)), what happens if I delete the file? Should I delete it?

EDIT: EPUBCheck is throwing warnings that all the .html files showing in the editor should be .xhtml files. Should the Editor's "Upgrade Book Internals" process have renamed them? Should I rename them?

Code:
<?xml version='1.0' encoding='utf-8'?>
<encryption xmlns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:enc="http://www.w3.org/2001/04/xmlenc#" xmlns:deenc="http://ns.adobe.com/digitaleditions/enc">
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="fonts/00002.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="fonts/00003.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="fonts/00004.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="fonts/00005.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
</encryption>

Last edited by enuddleyarbl; 06-27-2022 at 10:12 PM.
enuddleyarbl is offline   Reply With Quote
Old 06-27-2022, 10:54 PM   #2
Foozle
Connoisseur
Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.Foozle ought to be getting tired of karma fortunes by now.
 
Posts: 62
Karma: 221034
Join Date: May 2021
Device: None
As I've never seen the encryption.xml file for fonts as I don't use obfuscated fonts, my guess for those is because it's already "hidden" the fonts, that's the encryption for the obfuscation.

Regarding upgrading internals, having done it multiple times myself: As for html to xhtml, upgrading the internals does not automatically rename files. That's a manual process. All upgrading the internals does is upgrade the coding and adding the nav.xhtml and other arbitrary files, literally that's all it does. There is no actual renaming of files involved.
Foozle is offline   Reply With Quote
Advert
Old 06-28-2022, 12:50 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you have obfuscated fonts in the epub then encryption.xml is needed. Look at the fonts referenced in encryption.xml and decide if you want them or not.

As for the stupid epubcheck what you do about its meaningless warnings is up to you. If you intend to distribute the epub via some platform that mindlessly runs epubcheck over them, then its best to fix the warnings. Otherwise, ignore them.
kovidgoyal is offline   Reply With Quote
Old 06-28-2022, 08:56 AM   #4
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 776
Karma: 1538394
Join Date: Sep 2013
Device: Kobo Forma
Assuming I can just rename the file extensions to xhtml (i.e., there's no structural change), I'll probably do that just to get rid of all the warnings.

As to the fonts, none are in the Fonts section and I can find no reference to them anywhere in the book. So, I have no idea where they might be used of if they're needed. But, considering that I automatically delete all fonts when I start editing a book, I guess it ought to be fine without them. I'll try deleting the encryption.xml and see what happens.

EDIT: after some cursory research, it looks like converting those files from html to xhtml isn't simply a matter of changing the extension. Some things I've found that would have to be checked in the files are 1) document type declaration, 2) xhtml namespace declaration, 3) make sure element and attribute names are all lowercase, 4) match start and end tags, 5) make sure things like <br> are <br/>, 6) set all required attributes (and they're in quotes), 7) make sure all elements and attributes are in the xhtml spec being used. Those don't necessarily require changes in the files, but I guess I'd have to check for them.

Also, I did delete that encryption.xml file and everything seems fine. Since I've converted other epub2s to epub3 without getting encryption.xml files there, I'd guess that one previously existed here, I deleted it when I started editing, and the conversion process found its initial existence somewhere and put it back. Deleting it again shouldn't be a problem now if it wasn't then.

Last edited by enuddleyarbl; 06-28-2022 at 09:51 AM.
enuddleyarbl is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. MarjaE Library Management 1 03-30-2021 11:46 AM
CC stuck on "Database Upgrade: Book 0 of 1" jjmcgaffey Calibre Companion 4 01-02-2015 11:47 AM
No data in "In Library" and "On Device" columns after upgrade ily426 Library Management 8 04-03-2011 02:53 PM
Importing meta data from xml file exported from Google "My Library" net-buoy Library Management 0 03-14-2011 06:17 PM


All times are GMT -4. The time now is 09:36 PM.


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