I have several tables in my books, one having 7 columns and 30 rows. Does Epub recognise table css? If so, can someone suggest a stylesheet blurb for me to experiment with?
↧
Tables
↧
What part of epub is encrypted?
Is there an EASY way to determine what is causing epub to show as encrypted?
Editing my 3rd book and run into this strange encryption problem.
Draft2digital distribution service thinks that my 3rd epub is encrypted and will not publish on Kobo (Barnes and ibooks are fine). Previous 2 epubs I did not have this problem.
File originally created in inDesign for print version.
Original inDesign file export -> edited in Sigil -> well formed epub check passed -> external epubcheck passed.
In order to pass warnings in epubcheck I added Title and Creator in content.opf .
There are some 10 fonts embedded. Possibly encryption check is caused by one of those?
What else can I check?
Editing my 3rd book and run into this strange encryption problem.
Draft2digital distribution service thinks that my 3rd epub is encrypted and will not publish on Kobo (Barnes and ibooks are fine). Previous 2 epubs I did not have this problem.
File originally created in inDesign for print version.
Original inDesign file export -> edited in Sigil -> well formed epub check passed -> external epubcheck passed.
In order to pass warnings in epubcheck I added Title and Creator in content.opf .
There are some 10 fonts embedded. Possibly encryption check is caused by one of those?
What else can I check?
↧
↧
Disable touch screen event to execute return link of a footnote
I posted yesterday the following to the Kobo developpers part of the forum.
Obviously, that was a wrong place considering the 0 answer I got.
I hope I have found the rigth team; if not would be kind enough to point me the rigth one :smack:.
So, Hi guys.
I make ePub for my own on Kobo H2O.
I get problem with footnote.
I implement the call to footnote witk brakets to enlarge the reactive zone and save the actual notes in another file after the text.
All works fine in Calibre and does not go on Aura.
<sup class="calibre6"><a name="fnRet6"></a><a href="Chap8_205NotesBP.xhtml#fn6">[6]</a></span></sup>
<p class="calibre2"><sup class="calibre5"><span class="none24"><a name="fn6">6*</a></span></sup><span class="calibre8"><span class="calibre8">Labsence de termes adéquats
[<a href="Chap8_205.htm#fnRet6">retour</a>] </span></span></p>
In fact, when I touch the screen shortly either nothing happen or the high or low menu is displayed ; when I do it longer it is a pop up menu which appears. When I hit screen on the boarder, the page is turned.
Does it exist some html tag to disable all those normal but borrowing actions ?
Thank you for the help. :iloveyou:
Martin
Obviously, that was a wrong place considering the 0 answer I got.
I hope I have found the rigth team; if not would be kind enough to point me the rigth one :smack:.
So, Hi guys.
I make ePub for my own on Kobo H2O.
I get problem with footnote.
I implement the call to footnote witk brakets to enlarge the reactive zone and save the actual notes in another file after the text.
All works fine in Calibre and does not go on Aura.
<sup class="calibre6"><a name="fnRet6"></a><a href="Chap8_205NotesBP.xhtml#fn6">[6]</a></span></sup>
<p class="calibre2"><sup class="calibre5"><span class="none24"><a name="fn6">6*</a></span></sup><span class="calibre8"><span class="calibre8">Labsence de termes adéquats
[<a href="Chap8_205.htm#fnRet6">retour</a>] </span></span></p>
In fact, when I touch the screen shortly either nothing happen or the high or low menu is displayed ; when I do it longer it is a pop up menu which appears. When I hit screen on the boarder, the page is turned.
Does it exist some html tag to disable all those normal but borrowing actions ?
Thank you for the help. :iloveyou:
Martin
↧
Disable touch screen event
Hi guys.
I make ePub for my own on Kobo H2O.
I get questions especially around footnote.
Ever if I am following good rules to implement footnote the behaviors around touch screen could get borrowing.
Depending of the place of the footnote call, it could happen, when I touch the screen shortly either the high or low menu is displayed ; when I hit screen on the boarder, the page is turned.
Actually, doesn't it exist any xhtml tag to punctually disable the normal behavior of the touch screen ?
:bookworm:
Martin
I make ePub for my own on Kobo H2O.
I get questions especially around footnote.
Ever if I am following good rules to implement footnote the behaviors around touch screen could get borrowing.
Depending of the place of the footnote call, it could happen, when I touch the screen shortly either the high or low menu is displayed ; when I hit screen on the boarder, the page is turned.
Actually, doesn't it exist any xhtml tag to punctually disable the normal behavior of the touch screen ?
:bookworm:
Martin
↧
Epub format
In a conventional book, it starts with a title page, copyright page, dedication, table of contents, preface etc.
Does an Epub follow the same format? If so, should the 'automatic' TOC include these things, or should it simply start with 'chapter one'?
Does an Epub follow the same format? If so, should the 'automatic' TOC include these things, or should it simply start with 'chapter one'?
↧
↧
HELP needed with error codes
Hey,
I checked a selfmade ebook with epub validator and it gives many errors:
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm 36 2 Error while parsing file 'text not allowed here; expected the element end-tag'.
FATAL OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm 36 18 Fatal Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm - - Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.
Here is the ebook file:
<w:WordDocument>
<w:ActiveWritingStyle Lang="EN-GB" VendorID="64" DLLVersion="131078"
NLCheck="1">1</w:ActiveWritingStyle>
<w:ActiveWritingStyle Lang="EN-US" VendorID="64" DLLVersion="131078"
NLCheck="1">1</w:ActiveWritingStyle>
<w:ActiveWritingStyle Lang="DE" VendorID="64" DLLVersion="131078" NLCheck="1">1</w:ActiveWritingStyle>
<w:HyphenationZone>21</w:HyphenationZone>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:LidThemeOther>DE</w:LidThemeOther>
<w:LidThemeAsian>JA</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
And more errors:
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_001.htm 127 67 Error while parsing file 'text not allowed here; 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 OEBPS/Text/KINDLE FINAL JUNE 2017_split_002.htm 36 113 Error while parsing file 'attribute "target" not allowed here; expected attribute "charset", "class", "dir", "href", "hreflang", "id", "lang", "media", "rel", "rev", "style", "title", "type" or "xml:lang"'.
Here is the ebook file:
class="calibre4"> table="all" class="calibre5" id="calibre_pb_0"/>
<link target=":KINDLE FINAL JUNE 2017_files:props0002.xml" rel="dataStoreItem" href="../Misc/item0001.xml"/>
I would appreciate some help.
Best,
Bob
I checked a selfmade ebook with epub validator and it gives many errors:
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm 36 2 Error while parsing file 'text not allowed here; expected the element end-tag'.
FATAL OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm 36 18 Fatal Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_000.htm - - Error while parsing file 'The prefix "W" for element "W:WordDocument" is not bound.'.
Here is the ebook file:
<w:WordDocument>
<w:ActiveWritingStyle Lang="EN-GB" VendorID="64" DLLVersion="131078"
NLCheck="1">1</w:ActiveWritingStyle>
<w:ActiveWritingStyle Lang="EN-US" VendorID="64" DLLVersion="131078"
NLCheck="1">1</w:ActiveWritingStyle>
<w:ActiveWritingStyle Lang="DE" VendorID="64" DLLVersion="131078" NLCheck="1">1</w:ActiveWritingStyle>
<w:HyphenationZone>21</w:HyphenationZone>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:LidThemeOther>DE</w:LidThemeOther>
<w:LidThemeAsian>JA</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
And more errors:
ERROR OEBPS/Text/KINDLE FINAL JUNE 2017_split_001.htm 127 67 Error while parsing file 'text not allowed here; 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 OEBPS/Text/KINDLE FINAL JUNE 2017_split_002.htm 36 113 Error while parsing file 'attribute "target" not allowed here; expected attribute "charset", "class", "dir", "href", "hreflang", "id", "lang", "media", "rel", "rev", "style", "title", "type" or "xml:lang"'.
Here is the ebook file:
class="calibre4"> table="all" class="calibre5" id="calibre_pb_0"/>
<link target=":KINDLE FINAL JUNE 2017_files:props0002.xml" rel="dataStoreItem" href="../Misc/item0001.xml"/>
I would appreciate some help.
Best,
Bob
↧
CSS: Spans vs Font Families
I'm using Sigil to create epubs and iBooks primarily to preview them, and I have a recurring CSS problem that's driving me nuts. I'm not really sure if it's just a problem with spans or with a variety of nested elements, but here goes...
Imagine a div that has a CSS style specifying font families, either inline or in an attacked style sheet...
If I put a span inside that div, it may or may not inherit the div's CSS properties. Most of the time, I think it inherits all the properties EXCEPT font families. If I give the span its own CSS rule, it still doesn't work. In the following example, all the text is relatively small (75%), as it should be, and the text in the span is red. But the text in the span has serifs, when it should look the same as the text surrounding it.
I've tried various combinations of inline styles vs style sheets. It seems to be some kind of bug, because sometimes the text inside a certain element will look OK on one page, but the same combination of classes and styles doesn't work on the next page.
Things usually look OK in Sigil, but when I open my project in iBooks, the errors appear.
I should add that I haven't installed any fonts in my epub. About all I'm using are Arial and Verdana, which are installed in my computer and presumably in most people's computers.
Have any of you had a similar problem?
Imagine a div that has a CSS style specifying font families, either inline or in an attacked style sheet...
Code:
<div style="font-family: Arial, Verdana, sans-serif; font-size: 75%;">Text</div>
Code:
<div style="font-family: Arial, Verdana, sans-serif; font-size: 75%;">Text <span style="font-family: Arial, Verdana, sans-serif; color: #f00;">Red Text</span></div>
Things usually look OK in Sigil, but when I open my project in iBooks, the errors appear.
I should add that I haven't installed any fonts in my epub. About all I'm using are Arial and Verdana, which are installed in my computer and presumably in most people's computers.
Have any of you had a similar problem?
↧
starting a ol with a number > 1
Hi,
is there a way to start a ol with a number > 1 in ePub2?
We can not use the
or
attribute because they are not allowed in XHTML1.1
But we can not use the CSS
, because ADE do not support the ::after and ::before.
In past I remember I use a trick, putting an "display:none" to all the
before the
I want to start with, but I was wondering if there is a cleaner way to do this...
Fabrizio
is there a way to start a ol with a number > 1 in ePub2?
We can not use the
Code:
value
Code:
start
But we can not use the CSS
Code:
counter
In past I remember I use a trick, putting an "display:none" to all the
Code:
li
Code:
li
Fabrizio
↧
epub problem in publishing
The e-pub validator returns with this error which I don't know what it means or where to find the error and how to go about correcting it. Can anybody help me. It is most frustrating. I would be so grateful for any help.
File: OPS/section-0058.xhtml
Line: 10
Position : 13
Message: Error while parsing file 'element "a" not allowed here; 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")'.
File: OPS/section-0058.xhtml
Line: 10
Position : 13
Message: Error while parsing file 'element "a" not allowed here; 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")'.
↧
↧
Lesser used Dublin Core Metadata and Attributes
Hello
I've been doing a little research for an internal training workshop; I found that several Dublin Core properties are not described in detail in the OPF specification... nor could I find any specific examples of usage. The specification also provides for two optional attributes: xml:lang and xsi:type and I'm having trouble finding usage examples of the latter.
I've constructed the following metadata entries based on my present understanding of the Dublin Core documentation. Any suggestions, corrections (especially corrections!) or links to further reading material would be sincerely appreciated!
The dc:date property
Possible usage:
The dc:type element
I haven't seen this property used in any ebook, yet it seems fairly straightforward..
Possible usage:
The dc:format element
I haven't seen this used anywhere either..
Possible usage:
The dc:language element
This, of course is a mandatory element; in this case, my question is that RFC3066 has been made obsolete, first by RFC4646 then RFC5646... so is this code correct:
or should it be:
The dc:source element
I'm presuming that the ISBN of the print book from which the ebook is created might be listed here. In that case, how does the xml:lang attribute refine the value of this property?
The dc:identifier element
This, of course, is a mandatory element but the OPF specification clearly states that the identifier may have an xsi:type attribute but I can't find any other information about this.
Last of all, I've sort of given up on the dc:relation and dc:coverage elements... unless someone could give me an example of appropriate usage, please?
Any suggestions and thoughts sincerely appreciated!
Cheers
Nabodita
I've been doing a little research for an internal training workshop; I found that several Dublin Core properties are not described in detail in the OPF specification... nor could I find any specific examples of usage. The specification also provides for two optional attributes: xml:lang and xsi:type and I'm having trouble finding usage examples of the latter.
I've constructed the following metadata entries based on my present understanding of the Dublin Core documentation. Any suggestions, corrections (especially corrections!) or links to further reading material would be sincerely appreciated!
The dc:date property
Possible usage:
Code:
<dc:date opf:event="publication" xsi:type="dcterms:W3CDTC">2017-06-14</dc:date>
I haven't seen this property used in any ebook, yet it seems fairly straightforward..
Possible usage:
Code:
<dc:type xsi:type="dcterms:DCMIType">text</dc:type>
I haven't seen this used anywhere either..
Possible usage:
Code:
<dc:format xsi:type="dcterms:IMT">application/epub+zip</dc:format>
This, of course is a mandatory element; in this case, my question is that RFC3066 has been made obsolete, first by RFC4646 then RFC5646... so is this code correct:
Code:
<dc:language xsi:type="dcterms:RFC3066">en</dc:language>
Code:
<dc:language xsi:type="dcterms:RFC5646">en</dc:language>
I'm presuming that the ISBN of the print book from which the ebook is created might be listed here. In that case, how does the xml:lang attribute refine the value of this property?
The dc:identifier element
This, of course, is a mandatory element but the OPF specification clearly states that the identifier may have an xsi:type attribute but I can't find any other information about this.
Last of all, I've sort of given up on the dc:relation and dc:coverage elements... unless someone could give me an example of appropriate usage, please?
Any suggestions and thoughts sincerely appreciated!
Cheers
Nabodita
↧
Ready to Publish
Okaaaay, Im ready to go. :drinks: Learned Sigil, done my stylesheet, loaded my book, re-drawed diagrams in svg, checked for spelling, triple proofread, :mhew:
So, I think Ill try it on Kobo. Kindle maybe later.
Have I forgotten anything? Any suggestions what to do next? Link to a useful article maybe?
Thanks
So, I think Ill try it on Kobo. Kindle maybe later.
Have I forgotten anything? Any suggestions what to do next? Link to a useful article maybe?
Thanks
↧
Epubcheck Report Questions
Ive just done my first epubcheck in Sigil. Gotta a few questions about the report. :chinscratch: It was particularly unfavorable to my images.
My width value said "width=50%" So, whats wrong with that? Doesn't epub like percentages?
1. Width Value
Col: 163: ERROR(RSC-005): Error while parsing file 'value of attribute "width" is invalid; must be an integer'.
Col: 163: ERROR(RSC-005): Error while parsing file 'value of attribute "width" is invalid; must be an integer'.
My width value said "width=50%" So, whats wrong with that? Doesn't epub like percentages?
↧
Positioning text vertically on a page
So, I was going through different threads in the forum and found a post about using divs to position text vertically on a page. It seemed like a simple solution and so excited was I that I didn't bother to read any further... off I went to try it out and wow, it really worked so well in ADE!
Unfortunately, iBooks appears to be disregarding those empty divs completely and I can't find that thread anymore.
All I was trying to do was create a title page... it doesn't get simpler than that. :wall:
Here's my title page:
...and here's my CSS:
I already know the answer to my question but I'm asking anyway. This code won't work on apple devices, am I right?
I know I can use margins or padding to do this but changing the font size throws off the positioning.
Unfortunately, iBooks appears to be disregarding those empty divs completely and I can't find that thread anymore.
All I was trying to do was create a title page... it doesn't get simpler than that. :wall:
Here's my title page:
Code:
<div id="topGap"></div>
<p id="bookTitle">Scaramouche</p>
<p id="bookAuthor">Rafael Sabatini</p>
Code:
div#topGap {
margin: 0;
padding: 0;
height: 20%;
}
p#bookTitle {
font-size: 2em;
font-weight: bold;
height: 10%;
}
p#bookAuthor {
font-size: 1.6em;
font-weight: bold;
}
I know I can use margins or padding to do this but changing the font size throws off the positioning.
↧
↧
captions for photos
Is there a surefire way to make sure that captions stay on the same page as the photo they belong to? I'm creating an e-book with lots of photos. I did one previously and all was well but the captions did not always appear with the photo. I know that one surefire way is to make one image that includes the photo and the caption but that is very labor intensive and there are more than 500 images in this book.
Thank you in advance.
Thank you in advance.
↧
Converting ePub to djvu
I apologize from hopping from thread to thread with this djvu subject. Hopefully this thread will be the good one.
Question: I would like to be able to convert an EPUB to a fixed size djvu file as easily as I produce 9×12 PDF using the Prince PDF plugin when a simple click triggers a conversion script managing the options.
1. - about the qualities of the djvu format
What motivates this search is the fact that a djvu file could be much more compact, at least for some illustrated books, compared to a pdf one. If I judge from my limited experience (I use only Prince PDF to convert Epub to PDF) a text-only PDF can reach a very big size compared to a xhtml one. I consider a 200% to 300% size increase to be, on average, acceptable, but sometimes I get much higher percentages. An alternative solution could sometimes be useful and that's why I try to make up my mind about the usability of djvu.
As far as readability is concerned, if one select a good-enough resolution (300 dpi is default for bitonal images), I don't think bitmapped images from djvu can be a problem. Have a look at the wonderful Alice in Wonderland that Wikimedia choose to illustrate the capabilities of this format. Furthermore, even if it cannot compare with the gazillion tools available for the PDF format, the use of djvu, at least with Linux, is still comfortable. Koreader which is my reader tool of choice on my PW3 reads very well PDF but also DJVU files. Note also that the text is easily searchable at least with tools like Djview4.
Alice in Wonderland (attached below). This is a 3.5 MB book containing 114 pages with 57 images (14 of them full screen ), with an average size of 31 k by page. I wonder if one could achieve such a result even with an optimized PDF. I fail to see why it would not be advisable to convert directly some kinds of EPUB books like this one if I obtain a size advantage compared to PDF.
There are dissenting opinions about this though, for example from willus
The same recognizes that the most efficient compression level for PDF (JPEG-2000, or JPX encoding) is reported to be a "viewer killer" due to its slow rendering. A quick rendering would be provided with a PDF five times this size.
2. - about producing djvu files
This is a summary of what I tried.
Many organizations use djvu for the storage of electronic documents because of its size saving features. I did a few tries to check it. As I am a Linux user, I used the handy pdf2djvu conversion tool with a 300 dpi resolution. I got the following results:
- a 7.2 MB pdf became a 13.3 MB djvu. It contains 99.8% text and one cover image.
- a 26.5 KB pdf black and white image (300 dpi) became a 37.6 KB djvu.
- a 2.8 MB pdf colour image (600 dpi) produced by my scanner printer became a 176 KB djvu image (300 dpi)
Out of the third test, these tries do not seem very enticing as far as size saving is concerned.
Using djvudigital (and a compiled gsdjvu from an AUR package), a 1.2 MB 9×12 PDF resulted in a 1.6 MB djvu (300 dpi) which is marginally better than the first try but not yet satisfactory. It contains 99.8% text and one cover image. However, a Gallica PDF scan went down from 22 MB to 18.7 MB when converting to djvu with djvudigital.
So, for the time being, it seems it does not make much sense to start from a pdf to produce a djvu save for some rare use cases like this unoptimized colour image mentioned above.
The problem is that I do not know how to convert directly EPUB to a customized (9×12 cm) djvu format. Up to now, I found that the online site convertio converts directly nice documents in djvu format from epub but does not seem to offer any free choice for dimensions(it produces standard A4 files). It sells a "conversion API" choice but I am not sure if the "ouptput format" option applies also to djvu.
Other sites pretending to convert Epub to djvu do much worse. Sobolsoft uses a two step process, converting first to a temporary PDF and them converting to djvu. As you can read above, It's easy to do the same, for example using Jellby's plugin and then the excellent opensource pdf2djvu or djvudigital software. But as the output djvu file exceeds the PDF size this defeats my initial purpose...
Hopefully one day, a new plugin may appear which may enable us to go directly from epub to djvu format.
Question: I would like to be able to convert an EPUB to a fixed size djvu file as easily as I produce 9×12 PDF using the Prince PDF plugin when a simple click triggers a conversion script managing the options.
1. - about the qualities of the djvu format
What motivates this search is the fact that a djvu file could be much more compact, at least for some illustrated books, compared to a pdf one. If I judge from my limited experience (I use only Prince PDF to convert Epub to PDF) a text-only PDF can reach a very big size compared to a xhtml one. I consider a 200% to 300% size increase to be, on average, acceptable, but sometimes I get much higher percentages. An alternative solution could sometimes be useful and that's why I try to make up my mind about the usability of djvu.
As far as readability is concerned, if one select a good-enough resolution (300 dpi is default for bitonal images), I don't think bitmapped images from djvu can be a problem. Have a look at the wonderful Alice in Wonderland that Wikimedia choose to illustrate the capabilities of this format. Furthermore, even if it cannot compare with the gazillion tools available for the PDF format, the use of djvu, at least with Linux, is still comfortable. Koreader which is my reader tool of choice on my PW3 reads very well PDF but also DJVU files. Note also that the text is easily searchable at least with tools like Djview4.
Alice in Wonderland (attached below). This is a 3.5 MB book containing 114 pages with 57 images (14 of them full screen ), with an average size of 31 k by page. I wonder if one could achieve such a result even with an optimized PDF. I fail to see why it would not be advisable to convert directly some kinds of EPUB books like this one if I obtain a size advantage compared to PDF.
There are dissenting opinions about this though, for example from willus
Quote:
I don't recommend the djvu format for converting your epubs into fixed page format unless your epubs are mostly images. With text-based epubs, converting to djvu creates a bitmap for each page, whereas converting to PDF should store the text from the epub directly as text strings (as convertio does) without the need for bitmaps. This results in a very small PDF file size when converting large, mostly text epubs unless those epubs have a lot of different fonts that get embedded into the PDF. This is probably why the pdf2djvu utility ends up creating a larger djvu file than the original PDF file. There is also the added benefit that the text in the PDF file will render perfectly (with smooth edges) at any magnification, whereas the text in the djvu bitmapped pages will not. The djvu format is optimized for archiving scanned documents, not for converting epubs. |
2. - about producing djvu files
This is a summary of what I tried.
Many organizations use djvu for the storage of electronic documents because of its size saving features. I did a few tries to check it. As I am a Linux user, I used the handy pdf2djvu conversion tool with a 300 dpi resolution. I got the following results:
- a 7.2 MB pdf became a 13.3 MB djvu. It contains 99.8% text and one cover image.
- a 26.5 KB pdf black and white image (300 dpi) became a 37.6 KB djvu.
- a 2.8 MB pdf colour image (600 dpi) produced by my scanner printer became a 176 KB djvu image (300 dpi)
Out of the third test, these tries do not seem very enticing as far as size saving is concerned.
Using djvudigital (and a compiled gsdjvu from an AUR package), a 1.2 MB 9×12 PDF resulted in a 1.6 MB djvu (300 dpi) which is marginally better than the first try but not yet satisfactory. It contains 99.8% text and one cover image. However, a Gallica PDF scan went down from 22 MB to 18.7 MB when converting to djvu with djvudigital.
So, for the time being, it seems it does not make much sense to start from a pdf to produce a djvu save for some rare use cases like this unoptimized colour image mentioned above.
The problem is that I do not know how to convert directly EPUB to a customized (9×12 cm) djvu format. Up to now, I found that the online site convertio converts directly nice documents in djvu format from epub but does not seem to offer any free choice for dimensions(it produces standard A4 files). It sells a "conversion API" choice but I am not sure if the "ouptput format" option applies also to djvu.
Other sites pretending to convert Epub to djvu do much worse. Sobolsoft uses a two step process, converting first to a temporary PDF and them converting to djvu. As you can read above, It's easy to do the same, for example using Jellby's plugin and then the excellent opensource pdf2djvu or djvudigital software. But as the output djvu file exceeds the PDF size this defeats my initial purpose...
Hopefully one day, a new plugin may appear which may enable us to go directly from epub to djvu format.
↧
How to replace PNG images by SVG in epub?
I have been trying to substitute SVG images for PNG images in an epub off and on for three years (mostly off) with vey little (basically none) success. From time to time I learn or think of something to try, but I am now at the end of my rope.
The Creative Commons licensed book "Pro Git" by Scott Chacon has PNG illustrations, some of which are screen shots and many of which are line art diagrams with text. Naturally enough for an open source book about git, the source materials are in a git repository https://github.com/progit/progit (a second edition has since been published).
This is all fine, but the diagrams are tiny on high resolution screens. Iearned that the source for the diagrams is in dia format and get rendered into PNG. It turns out that dia can be rendered as SVG. So I unzipped the epub, deleted the diagram pngs, generated the svgs, change the <img src= in the html to refer to the svg files, and the media-type="image/png" to media-type="image/svg" in content.opf. (I've recently learned that it should have been media-type="image/svg+xml".) The rezipped and renamed epub worked great in FBreader in desktop linux but not in any dedicated reader or android tablet. The book text and screenshot PNGs would render, but the SVG diagrams would be completely absent or a small empty rectangle, depending on which reader application.
This inspired my question here 3 years ago. https://www.mobileread.com/forums/sh...d.php?t=242208
I had hoped that media-type="image/svg+xml" would be the magic cure, but all that did was get the built in "Reader" app on the NookHD. FBreader in Debian linux continued to work, but Android FBreader and Cool Reader continued to fail. I shouldn't really write fail since the epub itself fails epubcheck, but with puzzling error messages.
Epubcheck Version 3.0 said:
ERROR: progit-svg-xml-img.epub: I/O error reading 18333fig0101-tn.svg: Connection timed out
ERROR: progit-svg-xml-img.epub: I/O error reading 18333fig0102-tn.svg: Connection timed out
and so on...
Epubcheck Version 4.0.2 said:
Validating using EPUB version 2.0.1 rules.
FATAL(PKG-008): progit-svg-xml-img-auto.epub/18333fig0101-tn.svg(-1,-1): Unable to read file '18333fig0101-tn.svg'.
FATAL(PKG-008): progit-svg-xml-img-auto.epub/18333fig0102-tn.svg(-1,-1): Unable to read file '18333fig0102-tn.svg'.
So I am stumped and asking for help here.
My modified epub with SVG and original epub with all PNG attached.
Thanks for any help.
The Creative Commons licensed book "Pro Git" by Scott Chacon has PNG illustrations, some of which are screen shots and many of which are line art diagrams with text. Naturally enough for an open source book about git, the source materials are in a git repository https://github.com/progit/progit (a second edition has since been published).
This is all fine, but the diagrams are tiny on high resolution screens. Iearned that the source for the diagrams is in dia format and get rendered into PNG. It turns out that dia can be rendered as SVG. So I unzipped the epub, deleted the diagram pngs, generated the svgs, change the <img src= in the html to refer to the svg files, and the media-type="image/png" to media-type="image/svg" in content.opf. (I've recently learned that it should have been media-type="image/svg+xml".) The rezipped and renamed epub worked great in FBreader in desktop linux but not in any dedicated reader or android tablet. The book text and screenshot PNGs would render, but the SVG diagrams would be completely absent or a small empty rectangle, depending on which reader application.
This inspired my question here 3 years ago. https://www.mobileread.com/forums/sh...d.php?t=242208
I had hoped that media-type="image/svg+xml" would be the magic cure, but all that did was get the built in "Reader" app on the NookHD. FBreader in Debian linux continued to work, but Android FBreader and Cool Reader continued to fail. I shouldn't really write fail since the epub itself fails epubcheck, but with puzzling error messages.
Epubcheck Version 3.0 said:
ERROR: progit-svg-xml-img.epub: I/O error reading 18333fig0101-tn.svg: Connection timed out
ERROR: progit-svg-xml-img.epub: I/O error reading 18333fig0102-tn.svg: Connection timed out
and so on...
Epubcheck Version 4.0.2 said:
Validating using EPUB version 2.0.1 rules.
FATAL(PKG-008): progit-svg-xml-img-auto.epub/18333fig0101-tn.svg(-1,-1): Unable to read file '18333fig0101-tn.svg'.
FATAL(PKG-008): progit-svg-xml-img-auto.epub/18333fig0102-tn.svg(-1,-1): Unable to read file '18333fig0102-tn.svg'.
So I am stumped and asking for help here.
My modified epub with SVG and original epub with all PNG attached.
Thanks for any help.
↧
FlightCrew Error in Sigil
Okay, two things.
First, I was trying to add a second paragraph style to an ebook that would allow the bulk (a novel) to run under "p style" with an indented paragraph, except for a "p.first" to start every chapter. I've formatted multiple books this way, without issue.
But, I wanted to add an interview in the back matter and format it typical to interviews, all with no indent, and a space between paragraphs. I created a p1 style for this, which worked fine, except for the   between paragraphs. For whatever reason, the p1 when applied, messed with the space between paragraphs and created one long paragraph out of everything.
As a work around, the   would work if I wrapped it in a regular p style, and with find/replace it seemed an easy fix. Until FlightCrew, which turned up the "Error schema not satisfied: no declaration found for element 'p1' near column 5' which corresponds to the start of every p1 paragraph.
Is there something I need to add to the style? And would that fix the   issue? I did try to increase the bottom margin in the p1 style but it didn't seem to register and do anything.
Also, the ebooks (both epub and mobi) are displaying fine, but I'd like to wipe the error code off the board, and fix the   as well.
First, I was trying to add a second paragraph style to an ebook that would allow the bulk (a novel) to run under "p style" with an indented paragraph, except for a "p.first" to start every chapter. I've formatted multiple books this way, without issue.
But, I wanted to add an interview in the back matter and format it typical to interviews, all with no indent, and a space between paragraphs. I created a p1 style for this, which worked fine, except for the   between paragraphs. For whatever reason, the p1 when applied, messed with the space between paragraphs and created one long paragraph out of everything.
As a work around, the   would work if I wrapped it in a regular p style, and with find/replace it seemed an easy fix. Until FlightCrew, which turned up the "Error schema not satisfied: no declaration found for element 'p1' near column 5' which corresponds to the start of every p1 paragraph.
Is there something I need to add to the style? And would that fix the   issue? I did try to increase the bottom margin in the p1 style but it didn't seem to register and do anything.
Also, the ebooks (both epub and mobi) are displaying fine, but I'd like to wipe the error code off the board, and fix the   as well.
↧
↧
OPF missing opf metadata tag
I collect epubs from various sources and may clean them up and convert to azw to load on my Kindle.
I also set some metadata, but in a few files found these were not working correctly. Every time I saved it in Sigil it would change them: e.g.:
<dc:identifier opf:scheme="AMAZON">
became
<dc:identifier scheme="AMAZON">
and did not work properly (was ignored by kindlegen).
Also a swarm of errors turned up in epubcheck.
Eventually I found that the culprit was a metadata tag.
These files had:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
The well-behaved epubs had :
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
So I assume the latter part was needed to define the tags properly.
Adding that fixed the problem; metadata now works.
I don't know the cause of the omission; but perhaps this will be useful to others.
I also set some metadata, but in a few files found these were not working correctly. Every time I saved it in Sigil it would change them: e.g.:
<dc:identifier opf:scheme="AMAZON">
became
<dc:identifier scheme="AMAZON">
and did not work properly (was ignored by kindlegen).
Also a swarm of errors turned up in epubcheck.
Eventually I found that the culprit was a metadata tag.
These files had:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
The well-behaved epubs had :
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
So I assume the latter part was needed to define the tags properly.
Adding that fixed the problem; metadata now works.
I don't know the cause of the omission; but perhaps this will be useful to others.
↧
EPUB3-compatible Amazon ASIN metadata
In EPUB2 books, a metadata entry of the form
(where BXXXXXXXXX is the ASIN) seems to be the correct way to add such information. But in EPUB3, opf:scheme is not allowed, so Im wondering what the correct method should be. Seems something along the lines of
should work, but is this right? Is the <meta refines> even needed, or perhaps is the urn:AMAZON: not correct?
(Perhaps, following http://idpf.org/epub/30/spec/epub30-...f-dcidentifier and substituting 01 [Proprietary] for 06 [DOI], the second line should be something like
but http://stison.com/onix/codelists/onix-codelist-5.htm says, Note that <IDTypeName> is required with proprietary identifiers and there is no obvious place to put such IDTypeName information.)
Note that Im asking what the EPUB3 spec suggests. I know full well that the Kindle generating process ignores such metadata, and I know that the first line is a format Calibre will interpret and EpubCheck will pass.
Code:
<dc:identifier opf:scheme="AMAZON">BXXXXXXXXX</dc:identifier>
Code:
<dc:identifier id="amazon-id">urn:AMAZON:BXXXXXXXXX</dc:identifier>
<meta refines="#amazon-id" property="identifier-type" scheme="xsd:string">AMAZON</meta>
(Perhaps, following http://idpf.org/epub/30/spec/epub30-...f-dcidentifier and substituting 01 [Proprietary] for 06 [DOI], the second line should be something like
Code:
<meta refines="#amazon-id" property="identifier-type" scheme="onix:codelist5">01</meta>
Note that Im asking what the EPUB3 spec suggests. I know full well that the Kindle generating process ignores such metadata, and I know that the first line is a format Calibre will interpret and EpubCheck will pass.
↧
Forced line breaks and full justify
I've got this project that involves a poem with specific formatting. The lines need forced line breaks but also full justification. I searched a bunch on google and found various tricks that all fail to pan out when tried in the ePub.
Such as
https://stackoverflow.com/questions/...rows-in-a-poem
https://stackoverflow.com/questions/...text-using-css
The best solution did the breaks and the full justify (the second link) however when a long paragraph of text went from one page to the next the reader cut the lines off weird (top few pixels of a line at the and of the page and the rest of the pixels on the next page) -- I think due to the line-height confusing the reader (iBooks).
Any tricks for accomplishing forced line breaks and full justification?
- Doug
Such as
https://stackoverflow.com/questions/...rows-in-a-poem
https://stackoverflow.com/questions/...text-using-css
The best solution did the breaks and the full justify (the second link) however when a long paragraph of text went from one page to the next the reader cut the lines off weird (top few pixels of a line at the and of the page and the rest of the pixels on the next page) -- I think due to the line-height confusing the reader (iBooks).
Any tricks for accomplishing forced line breaks and full justification?
- Doug
↧