View Full Version : Help a Noob out?


ang7399
02-19-2012, 10:39 AM
Hi everyone! I am new to this forum, and new to ebooks....

A little background on what I'm doing:
My grandparents are authors, they have published many a book in their day, (related to their medical field) and now they are publishing a book about their lives. So they 'hired' me to design it for them. So we got it all done, and pretty. I designed it in Adobe InDesign CS5. Then they decided they wanted to publish it as an ebook after all that. So not a big deal I though, I knew that ID had an export to epub feature. Well I wish I was that lucky... I exported it and it failed the ePub Checker, and nothing worked the way it was supposed to. The table of contents didn't export in a way that let them show up in Adobe Digital Editions. There was NO css file at all, so none of my styles showed up. It was 'readable' in the essence that there were words, but nothing looked like it did in ID. Also to add insult to injury, there are about 50 images throughout the book, and I was told (and researched) that most major e-readers can display images.

Long story short, I managed to get an ePub file on my grandparents Nook to "test" everything, and it shows up, but is all sorts of messed up. I have 2 pages of edits from my grandma about what I need to fix. Mostly the images aren't displaying correctly (I had a black box around them, that's missing. None of the images are showing where they are supposed to - text flow is incorrect.) After researching it, I realized the file that we put on her nook to test was the original exported ePub file from ID that was far from correct. So I went ahead and created my own xhtml pages, typed up about a million miles of code. I Created my css, my toc.ncx, my content.opf and the container.xml files (I'll attach a screenshot of my folder structure so you can see where I'm at there)

As far as I can tell, I've done everything correctly. I zipped the containing folder and changed it to a .ePub and open it in ePub checker and I get the following error message:

:Length of first filename in archive must be 8, but was 30
:Required META-INF/container.xml resource is missing

And in Adobe Digital Editions I get the following error when I try to open it:
LIAR.epub:
The document appears to have minor errors that might cause it to be displayed incorrectly
--- errorListChange ---

I have invested about 13 hours so far into the ePub side of things, and I am about to pull my hair out over this. I have spent even more time researching this and I don't see what I'm doing wrong. I have checked the content file and the container file, and they all seem correct. I have compared the exported ID ePub files to my current files, and other than the exported ID files missing data, metadata, and the toc info, the "code" is the same! So in theory it should be working?! I even went as far as finding a tutorial and downloading his file and just changing his info to my info. I didn't touch the code, and it still doesn't work. I have searched a little on this forum to see if anyone has had any similar issues as me, but either I'm numb to it, or it's just not there.


Also we will be uploading the ePub to Lulu.com once all is said and done. I did notice a thread here that someone had issues with uploading to Lulu, and were getting error messages. So I am hoping to avoid those issues as well, but I'm not sure if my issue relates to that or not.

So any help you can offer would be great! Thanks In advance!!! :help:
Ang :o

82752

Doitsu
02-19-2012, 11:00 AM
As far as I can tell, I've done everything correctly. I zipped the containing folder and changed it to a .ePub and open it in ePub checker and I get the following error message:
:Length of first filename in archive must be 8, but was 30
:Required META-INF/container.xml resource is missing
The first file in an epub must be mimetype, which always contains the string application/epub+zip.
(ePub readers and validity checkers are quite picky about the order in which files are added to the ePub zip file.)
The best way to avoid these issues is to open a working ePub with 7Zip (http://www.7-zip.org/download.html) and to add/replace your updated files.
If you want to be on the safe side, edit your ePub with Sigil (http://code.google.com/p/sigil/), which has a built-in validator.

ang7399
02-19-2012, 11:07 AM
Lol, I was just coming back to edit my post about that... I figured out that my files were in the wrong order. So I have since fixed that. However now that my files are in the correct order, I am getting 123 errors from my ePub checker. I'll spare you from listing them all, but the jist of what I am getting is as follows:

FILE: LIAR.epub …has 123 error(s)

ERROR: /OEBPS/content.opf(6,14): The prefix "dc" for element "dc:title" is not bound.
ERROR: /OEBPS/content.opf: The prefix "dc" for element "dc:title" is not bound.
ERROR: /OEBPS/content.opf: unique-identifier attribute in package element must reference an existing identifier element id
WARNING: item (OEBPS/images/02-1_Pitcher and bowl.jpeg) exists in the zip file, but is not declared in the OPF file
WARNING: /OEBPS/images/02-1_Pitcher and bowl.jpeg: Filename contains spaces. Consider changing filename such that URI escaping is not necessary!

The errors I don't understand. At all. The warnings, I am declaring them in the OPF file so not sure why I would get that warning. As for the file names with spaces, does that really matter? (I am getting those two warnings for EVERY image in my file (hence the 123 errors total)

Doitsu
02-19-2012, 11:25 AM
As for the file names with spaces, does that really matter?
Yes, it's best to avoid them. In order to fix this issue, you'd have to replace each space in a file name reference with %20 (the hexadecimal code for a space character.); e.g. 02-1_Pitcher%20and%20bowl.jpeg
(This needs to be done both in the .opf and the .html files.

ang7399
02-19-2012, 12:11 PM
Yes, it's best to avoid them. In order to fix this issue, you'd have to replace each space in a file name reference with %20 (the hexadecimal code for a space character.); e.g. 02-1_Pitcher%20and%20bowl.jpeg
(This needs to be done both in the .opf and the .html files.

Wow, that sucks... that's a lot of renaming!

So do I have to rename the actual files? Or just the url in the opf and html files?

But what about the other error messages I have? What do they mean?

Toxaris
02-19-2012, 12:15 PM
It is always best to avoid special characters, including spaces, in filenames. If you open up the ePUB in Sigil you can easily rename the filenames of the images. The references to the images are then also changed to reflect the namechange.
There is also a built in validator in Sigil which usually much better understandable errror messages.

If you just open and save the file in Sigil, some of your errors will already be solved.

As a remark to your opening post, you state that 'None of the images are showing where they are supposed to - text flow is incorrect.'
I hope you are aware that ePUB is a reflowable format so it almost impossible to force the location of the images and still fill out the pages.

Doitsu
02-19-2012, 12:28 PM
So do I have to rename the actual files? Or just the url in the opf and html files?
Only the URLs in the .opf and .html files. Do a test with one file name first to make sure that you got it right. If the image still doesn't show, you might have add or edit the path, too.

As for the other metadata errors, simply create a dummy file in Sigil, add the desired metadata and then copy the whole metadata section to your .opf file.

As Toxaris suggested, using Sigil would be easier, however, Sigil will slightly change your folder structure.

ang7399
02-19-2012, 03:39 PM
Ok, maybe just because I am new to this, but what is Sigil?

mmat1
02-19-2012, 04:25 PM
Ok, maybe just because I am new to this, but what is Sigil?

Sigil is an ebup - authoring software. Look on the list of the forums here, and you'll easily find it.

ang7399
02-19-2012, 05:55 PM
Can I use it with my existing files? What I saw when I researched it was that its a WISIWIG... which is fine if I'm just starting out, but I already have all my files done, I just need to figure out what's wrong. I don't really want to start again since I've already done these files twice now.

Toxaris
02-20-2012, 01:26 AM
It is fine to use with your existing files. You can ignore the WYSIWYG. I always use it in Code View and then you just see your XHMTL files.

mrmikel
02-20-2012, 06:20 AM
The WYSIWYG function in Sigil is useful to get an idea how any changes you made might be displayed. Many users will create an original document elsewhere, in Word, LibreOffice, etc then bring in html or epub into Sigil to polish it up in code view.

If you must have pictures in a particular place, you might consider using PDF also. Many free PDF "printer" programs are available. You can provide both epub and pdf with very little extra effort.

Before you show off your "baby" to your grandparents, be sure to preview the file in a particular device. None of the devices display everything exactly the same. It is possible to work around many of the quirks of particular device, if they have one they are mostly likely to use.

ang7399
02-20-2012, 05:16 PM
Well I have the original PDF from my InDesign file, from before I re-did everything in xhtml. Would that be a better place to start?

I also have previewed the xhtml files in my web browser to make sure my code/css was correct. But should I be previewing them elsewhere as well?

ang7399
02-20-2012, 07:06 PM
So I downloaded Sigil, tried to open the epub file. Crashed and closed on me. Tried to open the pdf. That didn't work either, it's all just jarbled text.

I really have no idea why this is so hard for me to get to work. I was told I could just create the book in InDesign and export it. Isn't that the point? To design a book for print then when the client wants to sell it digitally, just export it? That's how it's advertised at least. (I wish it was that easy)

Toxaris
02-21-2012, 06:47 AM
It is quite unusual the Sigil crashes when opening an ePUB. It does not support PDF, so that is not surprising actually.

The ePUB export from InDesign does work, to some extent. The export is definitively not perfect and needs some tweaking afterwards. There are some posts around here from people describing their work procedure with ID.

If you want, I could take a look at it. However, then you must be willing to share the ePUB with me. I will look and make sure it validates.

ang7399
02-22-2012, 09:51 PM
Toxaris, I have no issue with sharing the epub with you, seeing as how it is already copywritten, and it is mostly family stories anyways. How do you want me to send it to you? PM?

Toxaris
02-23-2012, 01:33 AM
That's fine.

ang7399
02-25-2012, 09:06 PM
I sent you a PM, but not sure if it worked. let me know if you don't get it.

Toxaris
02-26-2012, 03:56 AM
I haven't got it yet...

ang7399
02-26-2012, 01:01 PM
OK, here is where I am at as of today:

I took out all the spaces and any type of symbol in my file names (I had a few with parenthesis and an ampersand in it, so I removed those as well) just in case it would pose an issue. I am still getting 3 or 4 files that come up with the error messages for the file names. I am getting a ton of errors now tho, that I don't understand again. I am assuming it is because of my lack of knowledge in this area. It is telling me that certain attributes (like images and other coding) aren't allowed and that my "assertion failed: the "id" attribute does not have a unique value!" (in my opf file). It is also telling me that my container.xml file is missing. Nope, definitely there...

I realized earlier this week that when I was simply taking my folder and ziping it, that the standard file structure of zipping it puts the files in the wrong order for the epub readers, which is why nothing was working earlier. Now I am using that special epub zipping software that zips it and puts it in the right order. That was when I started getting all these weird errors, but at least it is 'acting' like a real epub and at least opening in Digital Editions and on the nook. Except now I am back to square one and not getting my images to show up.

I have tried opening it in Calibre and saving it as an epub, same problems that I was getting before though. Still no images in the reader and on the nook. But it always looks ok in Calibre. When I 'convert books' in calibre, and tell it to save as an epub I get 3 files: the epub, the cover and an opf file that doesn't look correct when I open it - it is missing all of its manifest and spine, and well, everything else.

I get it to work in Calibre, opens fine, 'reads' fine. everything shows up the way it is supposed to with the images. (I was so excited for a few minutes) Then when I open it in Digital Editions and on my Nook, the both display the same way - pics are not showing up, just the border that I put around it with my css, but instead of being the right size, it is way to wide, and goes off the "page". In Calibre it shows my table of contents, and looks 100% correct, but in both Digital editions and on my nook, the cover is not displayed, and the toc are missing.

Toxaris
02-26-2012, 02:25 PM
I sent you my mail-adres. I will report the changes necessary and if useful for the forum I will also post it here.

ang7399
03-14-2012, 05:53 PM
So I just wanna say Toxaris is amazing!!

Only question is some of my photos are not showing up on the nook, but they are in Adobe Digital Editions. Any insight?

Toxaris
03-15-2012, 02:35 AM
Is there any structure? Like two photo's next to each other? Certain sizes?

ang7399
03-19-2012, 09:40 PM
All the pics are the same size, and some of the ones that are missing are with other photos, and some aren't. I made a few changes, and re-saved as epub. Then different photos are missing, and the ones that were missing before are now showing up?!

Toxaris
03-20-2012, 03:31 AM
That is very irregular behavior. It almost seems that the nook is out of memory or something and therefore unable to display. If you sent it to me again, I can check on my reader for you.

ang7399
03-25-2012, 05:14 PM
Email sent... thanks again!