Tuesday, January 19, 2021

EPUB error: The 'direction' property must not be included in an EPUB Style Sheet.


This is an example on Linux to resolve the following error from an epub book:

The 'direction' property must not be included in an EPUB Style Sheet.

(The steps on Windows system are similar.)


Steps 1: Put the EPUB book in a directory. And enter that directory.

$ mv mybook.epub tempdir

$ cd tempdir


Step 2: Unzip the book with a zipping tool.

$ unzip mybook.epub


Step 3: Use a text editor to modify the problematic stylesheet.css file to remove the line direction: ltr;

$ vi OEBPS/styles/stylesheet.css

 

Step 4:  Repackaging

$ zip -rX mybook-new.epub mimetype META-INF OEBPS

(Note: use the option -X to create filetype of EPUB for the package; file mimetype must be the first item added into the package.)



mybook-new.epub is the new book after the fix.

No comments:

 
Get This <