Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-23-2014, 05:29 AM   #1
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
Using svg graphics for title page

I have experimented a little with using svg graphics to get a nice-looking title page. In theory, it allows me better control over the vertical position of the text, relative to the page (screen) size, then I have been able to get with regular html/css.

I am happy with the result when viewed on my own Kindle Keyboard, and on Kindle Previewer's K. Paperwhite and K. Fire emulation. I am also pleased with what I get when I use Calibre to convert to epub format and view that in Adobe Digital editions.

But get more mixed results when I try to check other formats and conversion options. For example, if I run my mobi file from Kindlegen trough Calibre to get an epub (i.e xhtml -> (kindlegen) -> mobi -> (calibre) -> epub), the title page is miniaturized. And Kindlegen fails when I try to convert to Kindle iOS devices.

Have anyone else experience with this? Is it a viable way forward - or is the svg support in various ebook readers so poor that it is best to avoid svg?
Attached Files
File Type: epub titlepage.epub (127.3 KB, 296 views)
Lagopus is offline   Reply With Quote
Old 02-23-2014, 07:18 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
In order to get an .epub book is better than to convert from mobi to epub with Calibre, to use Sigil to built your epub from the .xhtml/.html files.

And your problem with your title page is because the way you are using the cover image. I attach a new epub this time made with Sigil.

Here you can see how the title page appears now in Calibre:

Click image for larger version

Name:	Image1.png
Views:	366
Size:	362.1 KB
ID:	119430

and here how the title page is showed in ADE:

Click image for larger version

Name:	Image2.png
Views:	349
Size:	318.5 KB
ID:	119431

In the epub below you can see how I have included the title page image. But remember, use Sigil to build your epub.

Regards
Rubén
Attached Files
File Type: epub test_svg_title_page_ukjent.epub (127.6 KB, 308 views)
RbnJrg is offline   Reply With Quote
Old 02-23-2014, 08:29 AM   #3
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
[QUOTE=RbnJrg;2771029]And your problem with your title page is because the way you are using the cover image.

My issue is not with the cover image, but with the title page. I.e. this:
Click image for larger version

Name:	previewer-screendump.PNG
Views:	586
Size:	56.2 KB
ID:	119433

And my issue was not specifically with the file I attached - but with the portability of the code I've used there. (I don't know what people will do with my books after I upload them here. There's a good chance some will do their own conversion to get the file I published onto their own preferred reader. So while my main focus is to make a book that looks good in one format, I would prefer to avoid using features that are likely to break on conversion.)
Lagopus is offline   Reply With Quote
Old 02-23-2014, 10:41 AM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Lagopus View Post

My issue is not with the cover image, but with the title page. I.e. this:

Attachment 119433

And my issue was not specifically with the file I attached - but with the portability of the code I've used there. (I don't know what people will do with my books after I upload them here. There's a good chance some will do their own conversion to get the file I published onto their own preferred reader. So while my main focus is to make a book that looks good in one format, I would prefer to avoid using features that are likely to break on conversion.)
By chance, did you open the epub that I have attached in my previous post with Calibre (that is the plataform where you have experimented problems)?

In my Calibre, the title pages in the epub made with Sigil are showed as following:

Click image for larger version

Name:	Image1.png
Views:	358
Size:	38.4 KB
ID:	119451

Click image for larger version

Name:	Image2.png
Views:	366
Size:	39.6 KB
ID:	119452

As you can see, no issues (title pages are not miniaturized any more in Calibre). Regarding the portability of the code, since it works fine in ADE, then also will work fine in all ereaders based on ADE (Nook, Sony, etc.). And as you could see by yourself, it also works in Kindle; so I think the code included in the epub made with Sigil, will be widely supported for ereaders. Make your epub with Sigil, and after that, convert it to .mobi with Kindlegen/Kindle Previewer and all will work fine.

Last edited by RbnJrg; 02-23-2014 at 10:55 AM.
RbnJrg is offline   Reply With Quote
Old 02-23-2014, 02:17 PM   #5
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
Quote:
Originally Posted by RbnJrg View Post
By chance, did you open the epub that I have attached in my previous post with Calibre (that is the plataform where you have experimented problems)?
I appreciate your effort, but you're still answering a different question than the one I ask.

My problem is not (just) with Calibre. If I convert from xhtml to epub with Calibre, the result looks the same as in your screen shots. That was the file I uploaded - to let people have an idea of what I was trying to do. (In other words: The epub you made with Sigil did not solve any problems in the file you started with - because there where no problems in that file.)

This is (some of) the conversions I've tested:

1) xhtml -> (calibre) -> epub: Good result. The font I specified doesn't exist, but that's OK.

2) xhtml -> (kindlegen) -> mobi: Good result. (Kindle DX does not seem to support svg at all, but if that was the only problem I might live with that.)

3) xhtml -> (calibre) -> mobi: Good result - like #1 the font specification is gone, but it's good enough.

4) xhtml -> (kindlegen) -> mobi -> (kindlegen) -> Kindle for iOS: Conversion fails.

5) xhtml -> (calibre) -> mobi -> (kindlegen) -> kindle for iOS: Good result. (That this works, when #4 didn't, is perhaps what baffles me most.)

6) xhtml -> (kindlegen) -> mobi -> (calibre) -> epub: Poor result - the svg graphic becomes a small box in the corner.

7) your sigil epub -> (kindlegen) -> mobi -> (kindlegen) -> Kindle for iOS: Conversion fails, same as #4.


Quote:
Make your epub with Sigil, and after that, convert it to .mobi with Kindlegen/Kindle Previewer and all will work fine.
I guess if I upload both an epub and a mobi, I should have most people covered with little need for other people to do their own conversion. But the problem with iOS devices worries me.
Lagopus is offline   Reply With Quote
Old 02-23-2014, 03:23 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
The EPUB you get from test #1 is exactly what you want, so why did you bother with test #6?

MOBI --> EPUB is automatically going to result in losing information.

Same with #'s 4 & 7, why are you converting from MOBI to AZK (the K4iOS format)? Just convert from xhtml/epub directly to AZK, instead of sending it through a lossy format like MOBI first.

Also, K4iOS can read MOBI even though the Kindle Store will send AZK by default.

Essentially, all your problems seem to be when you use MOBI as an intermediate format between two others.
eschwartz is offline   Reply With Quote
Old 02-23-2014, 04:15 PM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Lagopus View Post
I appreciate your effort, but you're still answering a different question than the one I ask.
Maybe you didn't understand me I responded what you asked.

First at all, Amazon won't accept a .mobi file made with Calibre, so forget Calibre.

Second, you need only one good file, an .epub one. Build this .epub with Sigil and then convert it to .mobi with Kindlegen.

Third, your problems with .azk files (for iPad) is not due to the code you used but is a bug of Kindle Previewer (the last one v.2.92, more precisely). You can read about it in the Amazon Forum.

Fourth, you made a lot of tests but starting with your .xhtml file, not with "my" epub. You only would need:

A) .xhtml ---> Sigil ---> .epub
B) .xhtml ---> Sigil ---> .epub ---> kindlegen ---> .mobi

So I ask you:

1) How does it look that epub (that one you get in step A) in ADE (that is what matters, because ADE is the base of many ereader).

2) How does it look the .mobi file you got by using kindlegen/kindle previewer to convert that epub (what you get in step B).

And for now, you won't be able to test .mobi files in Kindle Previewer/Ipad devices (unless you have an old version of Kindle Previewer)

Quote:
The epub you made with Sigil did not solve any problems in the file you started with - because there where no problems in that file.
In your first post you had said:

"For example, if I run my mobi file from Kindlegen trough Calibre to get an epub (i.e xhtml -> (kindlegen) -> mobi -> (calibre) -> epub), the title page is miniaturized."

So, how did you get the .epub you posted in first place? If you followed the steps you posted then that .epub, according to your words, should have title pages miniaturized. "My" epub, made with Sigil, doesn't have that issue.

Quote:
7) your sigil epub -> (kindlegen) -> mobi -> (kindlegen) -> Kindle for iOS: Conversion fails, same as #4.
As I told you before, the code is ok, the problem is Kindle Previewer.
RbnJrg is offline   Reply With Quote
Old 02-23-2014, 11:40 PM   #8
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
Lagopus said:
Quote:
(I don't know what people will do with my books after I upload them here.
Am I understanding right, that you mean to upload "here" to the MobileRead Library?

If so, some uploaders create muliple formats before uploading, and you could, for example, provide epub, mobi, and perhaps other Calibre-created formats.

But I may have misunderstood. If so, please ignore this.
GrannyGrump is offline   Reply With Quote
Old 02-24-2014, 07:08 AM   #9
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
@GrannyGrump: Some people like their texts justified, some hate it, some like spacing between paragraphs, some don't and so the long day wearies on and on....

@Lagopus: Given that the OPF file structure is pretty much identical between kindle and epub, maybe it is an idea to zip your own epub file, rather than suffer the vagaries that calibre imposes on your file? (I am full of admiration for the calibre team, but the price of implementing conversion from everything to everything is a rather unrecognizable file)

I haven't the guts to go for SVG book covers yet. It is tempting – it just feels silly to have a cover image that weighs in at more kilobytes than the rest of the book – but support seems to be too patchy so far.

(Here's how I zip up under linux, by the way
Spoiler:
Code:
cat >epub/META-INF/container.xml <<HEREDOC
<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
   <rootfiles>
      <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
   </rootfiles>
</container>
HEREDOC

   echo -n "application/epub+zip" > epub/mimetype
   zip -qX0 "$infile" mimetype
   zip -qrDX9 "$infile" META-INF/ OEBPS/
SBT is offline   Reply With Quote
Old 02-24-2014, 12:11 PM   #10
Lagopus
Member
Lagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with othersLagopus plays well with others
 
Posts: 21
Karma: 2864
Join Date: Feb 2014
Location: Norway
Device: kindle gen3
Quote:
Originally Posted by GrannyGrump View Post
Lagopus said:


Am I understanding right, that you mean to upload "here" to the MobileRead Library?

If so, some uploaders create muliple formats before uploading, and you could, for example, provide epub, mobi, and perhaps other Calibre-created formats.
Yes, that's what I mean. And yes, uploading multiple formats is a possible solution, as it reduces the need for downloaders to convert on their own. (With conversion tools I can't control and test.)

But as this way of coding a title page is mainly in the bells-and-whistles category, and not really necessary for the book, I have more or less decided to drop it, use a "traditional" html titlepage, and spend the time proofreading instead.
Lagopus is offline   Reply With Quote
Old 02-24-2014, 09:22 PM   #11
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,221
Karma: 35037583
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
@SBT -- I'm one of those who use a graphic book cover, but I have seen some nice ones that were simply html text. A nice decorative subsetted font to support some fancy text effects could weigh as little as 25 - 50 kb. It's something I'm considering for future projects.

(yup, I know, I know... support for embedded fonts isn't all heavenly bliss either.)

@Lagopus -- wouldn't it be wonderful if all devices and software followed the same standard, and offered the same feature support? I usually upload epub only, but in two versions -- one with drop-caps, floated images, svg, etc. And the other without those fancy features.

Welcome to MR!!! Looking forward to seeing your uploads!

Last edited by GrannyGrump; 02-24-2014 at 09:26 PM. Reason: typo
GrannyGrump is offline   Reply With Quote
Old 08-10-2014, 04:53 AM   #12
zonker
Member
zonker began at the beginning.
 
Posts: 18
Karma: 10
Join Date: May 2014
Location: Italy
Device: kindle
Quote:
Originally Posted by RbnJrg View Post

In the epub below you can see how I have included the title page image. But remember, use Sigil to build your epub.
I wrote the code for the title page the same way of your example file, but when I upload my epub to kdp characters appear very small, almost invisible... maybe should I have to use "em" instead of "px" for font-size?
zonker is offline   Reply With Quote
Old 08-10-2014, 09:17 PM   #13
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,764
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by zonker View Post
I wrote the code for the title page the same way of your example file, but when I upload my epub to kdp characters appear very small, almost invisible... maybe should I have to use "em" instead of "px" for font-size?
No, you can't use "em" for SVG images. In theory, svg supports "em" unit but in practice, doesn't I really don't know what is bad with your title page (if you follow my example) because it works fine for me. Try giving a bigger size to the text to see what happens.
RbnJrg is offline   Reply With Quote
Old 08-11-2014, 05:19 AM   #14
zonker
Member
zonker began at the beginning.
 
Posts: 18
Karma: 10
Join Date: May 2014
Location: Italy
Device: kindle
I tried both em and "bigger" px but nothing's changed. Maybe the problem is that I upload epub directly to kdp instead of converting it to .mobi with kindle previewer (where characters appear with right size)?
zonker is offline   Reply With Quote
Old 08-11-2014, 05:44 AM   #15
zonker
Member
zonker began at the beginning.
 
Posts: 18
Karma: 10
Join Date: May 2014
Location: Italy
Device: kindle
No, it's the same. After uploading to kdp characters become very small in online previewer...
It happens the same uploading (without saving) your example file.

Last edited by zonker; 08-11-2014 at 06:10 AM.
zonker is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub on IPad: SVG-graphics don't show. georg3200 Apple Devices 19 07-10-2013 02:41 PM
Centering SVG graphics in iBooks? FunkeXMix ePub 8 01-04-2013 09:21 PM
Which is the best way to add SVG (vector graphics) to PDF files ? DSpider PDF 0 04-01-2011 07:27 PM
Converting SVG graphics navels Sigil 5 03-15-2011 09:58 PM
Epub with full page graphics only zooming issue JonDeus Nook Color & Nook Tablet 10 03-10-2011 02:33 PM


All times are GMT -4. The time now is 05:31 PM.


MobileRead.com is a privately owned, operated and funded community.