View Full Version : Reg Validate EPUB documents Errors.


gsp
08-03-2011, 09:18 AM
Hi,

I converted pdf to EPUB using this tool ('http://calibre-ebook.com/about').

Our goal is to make the pdf file readable in eReader devices.

When checked the EPUB file in 'http://threepress.org/document/epub-validate/' below errors appear

These errors are different for different files.

Kindly advice to clear


ERROR: Sample_epub.epub: length of first filename in archive must be 8, but was 9
ERROR: Sample_epub.epub/OPS/page-001.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
ERROR: Sample_epub.epub/OPS/page-001.html(7): element "body" incomplete; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR: Sample_epub.epub/OPS/page-002.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
ERROR: Sample_epub.epub/OPS/page-003.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
ERROR: Sample_epub.epub/OPS/page-004.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
ERROR: Sample_epub.epub/OPS/page-005.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
ERROR: Sample_epub.epub/OPS/page-006.html(6): attribute "bgcolor" not allowed here; expected attribute "class", "dir", "id", "style", "title" or "xml:lang"
WARNING: Sample_epub.epub: zip file contains empty directory OPS/images/
Check finished with warnings or errors!

Thank You

Toxaris
08-03-2011, 02:08 PM
PDF to ePUB conversion will never give a good result without manual correction afterwards.
Try loading the result ePUB in Sigil and validate there. Probably the errors are more understandable there.

I must say that I am surprised, usually Calibre generates a bloated, but correct ePUB.

st_albert
08-04-2011, 02:57 PM
I must say that I am surprised, usually Calibre generates a bloated, but correct ePUB.

And Calibre certainly knows better than to generate the error referred to in the first line. Has there been any post-processing of the epub after Calibre got done with it? For example did you try to expand, possibly edit, and re-zip it?

sassanik
08-13-2011, 05:02 AM
Okay I have a random and weird fix that seems to work frequently for me. I generate my epubs in Calibre, then rename them to their isbn.epub name, then open them in Sigil, run a validation, and save it.

Just opening and saving in Sigil seems to get rid of some of the more random little errors that show up. Epubs for some reason hate it when you rename them, without opening them, then resaving them after. It should in theory not matter, but I think because its a zipped file it messes things up.

Anyway so I would suggest open in Sigil, save and re-run your validation.

Amy