quinta-feira, 16 de janeiro de 2020

The property should be declared in the OPF file

ERROR

ERROR(OPF-014): my-file.epub/OEBPS/Text/file.xhtml(14,32): The property 'svg' should be declared in the OPF file.


Solution

Open content.opf file and find inside manifest tag the declaration of page when error occurred.

On this example find "file.xhtml" 


<item id="file" href="Text/file.xhtml" media-type="application/xhtml+xml">


On this line add the attribute properties="svg"
<item id="file" href="Text/file.xhtml" media-type="application/xhtml+xml" properties="svg">

segunda-feira, 16 de outubro de 2017

Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'

ERROR

ERROR(RSC-005): my-file.epub/OEBPS/toc.ncx(14,32): Error while parsing file 'value of attribute "id" is invalid; must be an XML name without colons'.


Solution

verify the content source path of files declared on toc.ncx

change the attribute inside id (if only number) to "navpoint-x" 

verify document type
if have

<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"><ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/">

change to

<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"><ncx version="2005-1" xmlns="http://www.daisy.org/z3986/2005/ncx/">

quinta-feira, 6 de julho de 2017

Exists in the EPUB, but is not declared in the OPF manifest

WARNING

WARNING (OPF-003): my-file.epub(-1,-1): Item 'OEBPS/css/.file' exists in the EPUB, but is not declared in the OPF manifest.


Solution

remove file from your epub inside directory OEBPS/css/.file  

quarta-feira, 5 de julho de 2017

Irregular Doctype

Error

Id: HTM-004; Location: OEBPS/CoverImage.xhtml[-1,-1]; Message: Irregular DOCTYPE: found '', expected '
'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>'.


Solution

open file OEBPS/CoverImage.xhtml and change <!DOCTYPE html> to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 

terça-feira, 4 de julho de 2017

How to validate ePUB file

If you need to validate your ePUB file (version ePUB 2 and 3) try to use this tool: http://validator.idpf.org/ or download the tool from https://github.com/IDPF/epubcheck/releases (scroll down to Download area)


Using downloaded tool
1. Extract compressed file to a folder.
2. Move folder to root (for
 [windows]
xcopy C:\Users\%USERNAME%\Downloads\epubcheck-4.0.2\* C:\epubchek /s /i  
 [MAC]
mv ~/Downloads/epubcheck-4.0.2 ~/epubcheck
 c:\ on windows or to /~  on Mac
3. Open command line (terminal on Mac)
4. Navigate to folder
 [windows]
cd c:\epubchek 
 [MAC]
cd ~/epubcheck

5. Run command line to execute tool
java -jar epubcheck.jar [path-of-your-epub-file]
ex:
 [windows]
java -jar epubcheck.jar C:\Users\%USERNAME%\Desktop\my-file.epub
 [MAC]
java -jar epubcheck.jar ~/Desktop/my-file.epub