10-06-2011, 08:13 PM | #1 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
ePub Preview
I want to create an ePub preview of my book on lulu.com.
I looked at the sample ePub file of my book from the ibookstore on my iPod, but there is no way to drag it onto my desktop. I tried simply removing all but 4 chapters from the text folder, but that seems to create errors. So, how can create an ePub containing a few sample chapters? Thanks. |
10-06-2011, 11:19 PM | #2 |
Zealot
Posts: 128
Karma: 238654
Join Date: Aug 2009
Device: Kobo Mini (4GB), Nook Classic wi-fi, iPod Touch (Bluefire Reader)
|
When you delete the chapters, you also have to remove the references to those files from the content.opf and toc.ncx files. You can edit them with any text editor.
The content.opf file is the manifest that has all the info about the files contained in the book, it should have two lines for every chapter, one in the <manifest> section that will look something like this <item href="Text/chapter04.xhtml" id="chapter04" media-type="application/xhtml+xml" />, one in the <spine> section that will look something like this <itemref idref="chapter04" />, you need to delete both lines for every chapter. Also any images used only in the deleted chapters will also need to be deleted from the epub and the <manifest> section. The toc.ncx is the table of contents for the book, this is what allows you to select a chapter from your reader menu, there is a section for every item in the table of contents that starts with <navpoint id="navpoint-something" playOrder="something"> and ends with </navpoint> delete everything between and including those two tags for every chapter deleted. Also you could use Sigil to delete the chapters and it will automatically update the content.opf file, and you can do the editing of the toc.ncx in Sigil. Last edited by Keroberos; 10-06-2011 at 11:25 PM. |
Advert | |
|
10-07-2011, 01:01 AM | #3 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
Thank you for the helpful and detailed information.
|
10-07-2011, 01:02 PM | #4 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
You could also replace the chapters with a dummy chapter that contains no actual content. This solution would be useful if you want the sample to show the names of all the chapters which is useful on a technical eBook.
While the submitter cannot do it there is also a way to place DRM on some files but not others permitting the same book to be both a sample and a full book. Dale |
10-07-2011, 02:24 PM | #5 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
Thanks for this tip, too
|
Advert | |
|
10-08-2011, 04:05 PM | #6 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
ePub errors
I tried making sample chapters with a bit of text for buyers to see, but when validating, I get these errors for each chapter involved. Here's a sample:
1. ERROR: preview_empowered_10_8_11.epub: could not parse OEBPS/Text/05_chapter.xhtml: duplicate id: heading_id_3 2. ERROR: preview_empowered_10_8_11.epub: could not parse OEBPS/Text/06_chapter.xhtml: duplicate id: heading_id_3 3. ERROR: preview_empowered_10_8_11.epub: could not parse OEBPS/Text/07_chapter.xhtml: duplicate id: heading_id_3 How would fix this? Thanks. |
10-09-2011, 02:02 PM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
You probably have some duplicate names in your ePUB. If you are running Sigil, please recreate the TOC from the headers, that should solve your issues.
You can do it manually by changing the id's in the header tags. It is not that hard, but you need to check your opf also then. |
10-09-2011, 03:28 PM | #8 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
Recreating the TOC in Sigil creates another error:
1. ERROR: test_preview_empowered_10_8_11.epub/OEBPS/toc.ncx(92): assertion failed: different playOrder values for navPoint/navTarget/pageTarget that refer to same target Going back to the original error: 1. ERROR: preview_empowered_10_8_11.epub: could not parse OEBPS/Text/05_chapter.xhtml: duplicate id: heading_id_3 Here is the code. Where is the error? <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>An Artist Empowered</title> <link href="../Styles/template.css" rel="stylesheet" type="text/css" /> <link href="../Styles/page-template.xpgt" rel="stylesheet" type="application/vnd.adobe-page-template+xml" /> <style type="text/css"> /*<![CDATA[*/ p.sgc-4 {margin-top: 0.4em; margin-bottom: 1.2em; page-break-inside: avoid; text-indent: 0px; font-size: 11px; text-align: left; margin-right: 0em; margin-left: 2em;} p.sgc-3 {margin-top: 1em; margin-bottom: 0.1em; page-break-inside: avoid; text-indent: 0px; font-style: italic; text-align: left;} h1.sgc-2 {font-size: 17px; text-align: left; color: rgb(0, 153, 255); margin-top: 0em; margin-right: 0em; margin-bottom: 0.5em; margin-left: 1em;} span.sgc-1 {font-weight: normal; text-transform: none; font-size: 14px;} div.sgc-7 {font-size: 120%} span.sgc-6 {font-size: 120%} span.sgc-5 {font-size: 14px} h3.sgc-10 {font-size: 120%} span.sgc-9 {font-size: 14px;} span.sgc-11 {font-size: 17px;} /*]]>*/ </style> </head> <body> <div id="x05-chapter"> <h1 class="chaptertitle" id="toc-anchor"></h1><span class="sgc-1">5: A NEW POSTER CHILD</span> <h1 class="chapter-subhead sgc-2" id="heading_id_2"><span class="sgc-1">Artist as Hero</span></h1> <p class="sidebar-quote-sj1 sgc-3"><span class="sgc-1">The act of rejection, as well as acceptance, is based on subjective criteria and has nothing to do with your value as an artist, or as a human being.</span></p> <p class="sidebar-author sgc-4"><span class="sgc-1">CAROLL MICHELS</span></p> <p class="sidebar-author sgc-4"><span class="sgc-1"><br /></span></p> <p class="sidebar-author sgc-4"></p> <h3 class="sidebar-author sgc-4" id="heading_id_3"></h3><span class="sgc-1 sgc-6">Buy the complete book: print or </span><span class="sgc-11">eBook</span> <h3 class="sidebar-author sgc-4" id="heading_id_3"><span class="sgc-1 sgc-6">An Artist Empowered: Define and Establish Your Value as an Artist—Now</span></h3> <h3 class="sidebar-author sgc-4 sgc-10" id="heading_id_3"><span class="sgc-9">By Eden Maxwell</span></h3> <h3 class="sidebar-author sgc-4 sgc-10" id="heading_id_3"><span class="sgc-9">“Eden Maxwell’s art is brilliant; he’s the real thing, a true creator.” </span></h3> <h3 class="sidebar-author sgc-4 sgc-10" id="heading_id_3"><span class="sgc-9"> —Mary Anne Bartley, Artist-in-Residence: Villanova University, WHYY, PBS</span></h3> <div class="sgc-7"> <br /> </div> </div> </body> </html> |
10-09-2011, 07:30 PM | #9 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Do a search on id= and you will find that you have several with heading_id_3. That is what duplicate means. you cannot repeat an id within the same file or you will have a duplicate.
|
10-10-2011, 04:14 PM | #10 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
Yet another ePub error
I went into the code and fixed those duplicates on all my chapters with Sigil. The ePub did pass the validation on Threepenny consulting website.
But when I upload this file to lulu.com, I get another error message. How to I fix this? |
10-10-2011, 06:29 PM | #11 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
That sounds like it is complaining about the metadata section of your packaging file (the .opf file). What does it look like (look for the dc:creator and dc:date elements).
-- -jim |
10-10-2011, 06:50 PM | #12 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
I see this: <dc:creator opf:role="aut">Eden Maxwell</dc:creator>
But I don't see dc:date, or date? |
10-11-2011, 12:55 AM | #13 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
dc:date is a required element, so you'll want to add that.
Also is there an opf namespace definition in your metadata element? |
10-11-2011, 01:59 PM | #14 |
Enthusiast
Posts: 45
Karma: 10
Join Date: Nov 2010
Location: New Mexico
Device: none
|
OPF File
I've attached the OPF in question, as this may be easier than me guessing what to do and how.
Thanks. |
10-11-2011, 03:38 PM | #15 |
Evangelist
Posts: 416
Karma: 14682
Join Date: May 2008
Location: SF Bay Area
Device: Nook HD, Nook for Windows 8
|
You sent it as an RTF file, instead of the raw text. I'm assuming that happened after extraction from the epub rather than before - or I would expect to see different validation errors - but you may want to check just in case.
Edit: Outside of it being RTF, I didn't see anything obvious in the file that would fail validation. Last edited by Jim Lester; 10-11-2011 at 05:53 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ePub/mobi preview viewer | MSWallack | General Discussions | 2 | 12-22-2011 05:13 PM |
ebook preview | venkatesh | General Discussions | 12 | 11-18-2010 11:58 AM |
Anyone going to d/l the latest preview of 3.0.3 | KeziaPurrs | Amazon Kindle | 20 | 11-13-2010 06:06 PM |
Firmware Update 3.0.3 Early Preview is here | mrzerga | Amazon Kindle | 95 | 11-03-2010 09:52 PM |
Pay to preview? | WT Sharpe | General Discussions | 7 | 09-26-2010 02:21 PM |