View Full Version : Epub Validation Error Help Please


VictoriaSkyline
06-12-2012, 01:30 PM
Hello

Used Microsoft .doc - created Epub on Barnes and Noble "Pubit"

A few chapters have large white gaps (like page break where it's not) between a few paragraphs. I've removed all formatting. Redone the book. Nothing removes spaces.

This book will not pass Validation.

Used Calibre> remove spacing > now It Validates fine but still shows the gaps.

Tried saving Word .doc as Web page filtered to make complete Epub in Calibre. Formatting looks perfect but Got more Validation errors than ever.

Nothing seems to be working. Is there a way to remove those gaps with my original epub?

This same file converted on Amazon Kindle works fine. The epub is the problem.

Any help appreciated.
Thank you
Victoria

DiapDealer
06-12-2012, 02:19 PM
Note (in the ePub) the class names of the html elements preceding and following the gaps:
<p class="blah-blah">

Open the css stylesheet and locate the class names from above.

In the properties for those classes, look for "margin", or "margin-top", or "margin-bottom" attributes that are not zero (0).

Make them zero, or reduce them or remove those attributes until the spacing looks how you want it to.

VictoriaSkyline
06-12-2012, 03:08 PM
Thank you. I'll try it and let you know if I can do it.

Would I edit this in Calibre? I just opened the epub with Calibre viewer, and it looks perfect, just like the Kindle book did.

It has gaps on Adobe Digital Reader and on my tablet Cool Reader (here the gaps are less noticeable than AD Editions)

Could this be a reader glitch? To be sure, can you please tell me what program to use to search for the CSS tag you mentioned?
Thank you so much !!

JSWolf
06-12-2012, 03:18 PM
Give Sigil a go.

PeterT
06-12-2012, 03:57 PM
You could also look at this plugin for calibre: [Input Plugin] DOCX Input (http://www.mobileread.com/forums/showthread.php?t=180729)

VictoriaSkyline
06-12-2012, 04:13 PM
Thank you !

VictoriaSkyline
06-12-2012, 04:36 PM
Hi

I downloaded Sigil and it seems straightforward. My problem: It won't import my entire epub into Sigil because I think it's picking up the gap as a break or separate file. I can't get to the rest of the book. This is the html. I found <spam> and <div> which should not be there, correct? I can't save the file because Sigil is giving me an error when I try to save, after I deleeted that html:

This is the location of first Gap and where Sigil stopped importing:

<p class="pubitCssCls25"><span class="pubitCssCls24">Mona stood at the end of the aisle</span><span class="pubitCssCls24">.</span> <span class="pubitCssCls24">Sienna shoved the money into her hand</span><span class="pubitCssCls24">.</span> <span class="pubitCssCls24">"</span><span class="pubitCssCls24">T</span><span class="pubitCssCls24">here’s no one at the register.</span></p>
</div>
</body>
</html>

This is the error message when I tried to save:

Error info: Cannot save file C:/Users/January/Desktop/LoveDreamsPublit.epub: ..\..\..\main_code\src\Sigil\Exporters\ExportEPUB. cpp(162): Throw in function void __thiscall ExportEPUB::SaveFolderAsEpubToLocation(const class QString &,const class QString &)
Dynamic exception type: class boost::exception_detail::clone_impl<struct CZipExceptionWrapper>
std::exception::what: Unknown exception
[struct zip_info *] = Permission denied.

Sigil version: 0.3.2
Runtime Qt: 4.7.0
Compiled Qt: 4.7.0
Platform: Windows SysInfo ID 144

Doitsu
06-12-2012, 05:52 PM
I downloaded Sigil and it seems straightforward.
Sigil 0.3.2 is totally outdated. You may want to download version 0.5.3.


My problem: It won't import my entire epub into Sigil because I think it's picking up the gap as a break or separate file.

Define "gap."


This is the location of first Gap and where Sigil stopped importing:
...
</div>
</body>
</html>

Since </html> is used to mark the end of an .html file, that's to be expected.

You could try the following:
1. Rename the .epub file to .zip.
2. Extract the .html files and add them separately to a new Sigil ebook.

VictoriaSkyline
06-12-2012, 06:44 PM
What I mean by gap is there is a break between some paragraphs where it looks like a page break or end of chapter.

VictoriaSkyline
06-12-2012, 06:46 PM
Where is the best site to download Sigil from? When I used Softonic I ended up with a toolbar addon and tons of browser ads. I managed to remove it.

Is there a safe download?

DiapDealer
06-12-2012, 06:55 PM
Is there a safe download?
Yes. Download it from Sigil's official home. http://code.google.com/p/sigil/downloads/list

VictoriaSkyline
06-12-2012, 08:07 PM
Hi again

If I can view the source code as html on my website, and do not see anything out of order, what could be causing this?

When I view the book on Calibre there are no gaps. The file I used to create a Kindle ebook is perfect, book works fine. Could it be Pubit conversion? Has anyone heard of this?

JSWolf
06-12-2012, 10:21 PM
Before you update to a new version of Sigil, uninstall the old one. There were some issues upgrading on top of during the beta testing.

Doitsu
06-13-2012, 04:51 AM
If I can view the source code as html on my website, and do not see anything out of order, what could be causing this?
Different ePub viewers sometimes display ePubs slightly differently. You said that it displays fine in Calibre. What ePub viewer/reader is displaying the "gap?"

Calibre is an excellent tool, but you may want to use ADE (http://www.adobe.com/products/digitaleditions/#fp) for testing purposes since most ebook reader manufacturers licensed ADE technology from Adobe. I.e. if it looks OK in the ADE desktop version, it usually looks OK on the actual devices.

My guess would be that Pubit split the original .html file into sever smaller smaller files to avoid file size limitation issues and if your original single .html source file contained a top margin definition, it might have been carried over to the split files causing the "gap" issues.

You can easily test this, by renaming your .epub file to a .zip file and unzipping the .html files. If the "gaps" occur at the end of an .html file, file splitting and/or style issues are causing the problem.

The file I used to create a Kindle ebook is perfect, book works fine.
Not necessarily, because Kindlegen and Calibre simply skip HTML code that Kindles cannot handle. Also Kindle source files don't have to be split.

VictoriaSkyline
06-13-2012, 11:28 AM
Hi
Thank you for the info. The gap is visible using ADE and Nook reader for PC. Here's the catch (frustrating). I can get this copy to Validate. But - when I create a perfect viewing copy using Mobi & Calibre, I get a long list of errors. It's a catch 22. Do I distribute a flawed copy with gaps that will validate or a perfect one that retailers won't carry because it won't validate.
I found this: http://www.istonsoft.com
First I'm going to try your suggestion of renaming to zip and see if I can spot anything. If not, I'll try the ebook creator on that site.
I'll keep you posted.
Thank you !!

VictoriaSkyline
06-13-2012, 11:43 AM
Hi

I unzipped the file. There are 6 different pages. I think that's where the gaps are occurring. Is there a way to merge them while still passing validation? Have you seen epubs saved in sections?
Thank you

Doitsu
06-13-2012, 01:40 PM
Is there a way to merge them while still passing validation?
You could easily merge them with an editor or Softsnow Merger (http://softsnow.griffin3.com/merger/merger.shtml), however, this will also cause problems because then the single .html file will most likely be larger then 300KB and epubcheck will display a different warning.


Have you seen epubs saved in sections?
That's pretty much the default, because many older readers cannot handle .html files larger than 230KB.

Your problem is most likely caused by a style embedded in the .html file or a style in a linked .css file. I'd recommend opening the second or third .html file in an editor. Have a look at the header and copy everything from the first line (<?xml version="1.0" ...?>) to the very first paragraph. Post the excerpt here. If you see <href link ...>, attach the .css file, too.

JSWolf
06-13-2012, 02:37 PM
The real problem is that it is hard to tell what's going on without seeing the CSS and XML code in question.

DiapDealer
06-14-2012, 12:21 PM
The end of one html file and the beginning of another will always result in "gap" in an ePub (at least with most Adobe RMSDK-based devices/apps, anyway). Unless the end of the first file happens to accidentally fill a "screen" (at that font-size) that is. That's the way it works. Think of a physical book and the end of a chapter. The next chapter doesn't immediately start on the same page. The rest of the page is blank and the new chapter starts on the next page.

It's your responsibility to make sure that the epub is broken up (physical file-wise) into logical sections (such as chapters) and not in the middle of a chapter/section.

You can merge files with the Book Browser in Sigil and then split them at logical points.