I just purchased a Kobo Touch the other day and have a couple questions regarding ePub > ePub conversions. First, a little background:

I had previously been using my iPhone as an eBook reader. I didn't have an issue with the size of the screen, but I didn't like the backlight for reading (so really, I never used it — just read "oldschool" paper-based books. <G> Anyway, I tested out the Kobo Touch and just really liked how the screen looked for reading, so decided to get one as a dedicated eBook reader.

First thing I did was purchased a book, via wifi, from the store, and so far, no major complaints. For basic reading, the device does the job quite well. Then, I loaded up a "generic" ePub I had kicking around (from when I first tried reading on my iPhone) and while the Touch displayed the file, it didn't do a great job (I don't blame the Touch, it was just a random ePub file, obviously not formatted for the Kobo device).

So, I fired up Calibre and did an ePub > ePub conversion on the file and it looked a heck of a lot better. So, I spent an hour or so tweaking the Calibre settings, converting, testing on the device, tweaking some more, converting, and so on. In the end, I ended up with a pretty well working file on the Touch — not perfect, but pretty darned good. That said, below are some observations/questions in the hopes that I can fine-tune this process further.

For the ePub > ePub conversion, for Page Setup, I used the "Default Input Profile" (as I have no idea what the source actually was) for the input profile, and for the output profile, I choose Kobo Reader.

After converting, using the default settings, I found that the resulting ePub file, when loaded onto the device, didn't respond to the Kobo Touch setting to change the margins. They seemed stuck at the 5pt Margins (set in Calibre via Page Setup). The eBook I purchased from the Kobo Store didn't have this issue and responded to margin changes (via Kobo Touch settings options). So, back in Calibre, I loaded up the file again and this time I set Look & Feel > Filter Style Information > Margins to "checked". I converted and loaded the file back onto the Touch. Now, the margins setting on the touch worked fine. So, I assume that by default, Calibre is setting the margins via CSS, and the Touch can't override this. None-the-less, setting the Filter Style Information to remove the Margins CSS fixed this.

Along the same line, I also found that the resulting converted file, when viewed on the device, wouldn't respond to line-spacing changes (when modified via the Kobo settings to increase/decrease line-spacing). So, I'm wondering if anyone knows how I'd solve this issue? It looks like Calibre is setting these values, again, via Look & Feel (and again, as CSS, I assume), but I'm unsure how to "remove" this so the Touch can actually modify line-spacing? Any suggestions?

This only other, minor issue, I have is with respect to the page count. On the ePub that I purchased, when I view the book, along the footer it displays "Page X of Y" with regards to how many pages there are in the current chapter (Y) and what page I'm on (X), this updates with each page turn, and dynamically changes depending on margin size, font size, etc. But, when I view a generic ePub file, while it still displays "Page X of Y", it looks like "Y" is the actual number of pages the book originally had and "X" is the overall page I'm on — so, depending on margin size, font size, etc., "X" only updates every 3-4 virtual page-turns (which, I assume, equal a "real" page of the original text). Is there any way, via Calibre, to make the generic ePub act more like a Kobo ePub in this respect?

That's about it for now. If anyone has any suggestions on the above, or any other advice with regards to conversions for the Kobo Touch, it'd be appreciated!

Along the same line, I also found that the resulting converted file, when viewed on the device, wouldn't respond to line-spacing changes (when modified via the Kobo settings to increase/decrease line-spacing). So, I'm wondering if anyone knows how I'd solve this issue? It looks like Calibre is setting these values, again, via Look & Feel (and again, as CSS, I assume), but I'm unsure how to "remove" this so the Touch can actually modify line-spacing? Any suggestions?

I just tried your fix to enable margin adjustments and it worked. I'm so pleased!

Here's how I enabled line-spacing (or leading). In that same Look & Feel screen, change "Maximum Line Height" to 0.0%. This effectively disables it and allows leading to be set on the kobo Touch.

This only other, minor issue, I have is with respect to the page count. On the ePub that I purchased, when I view the book, along the footer it displays "Page X of Y" with regards to how many pages there are in the current chapter (Y) and what page I'm on (X), this updates with each page turn, and dynamically changes depending on margin size, font size, etc.

Be careful; when you buy a book from the Kobo site and download via the Touch (or Kobo Desktop) you're not actually getting an ePub version; rather, you are getting what we have nicknamed a kePub. This is ONLY viewable via a Kobo device or application. You can easily tell that what you are reading is in this format by the page # display; the (X) of (Y) within the chapter.

To get an actual ePub version you need to go to the http://kobobooks.com website, logon with your ID / password, and then head the to the My Library link. Once there, the Purchased tab will list all the books you have bought. Along side each one should be a Download ePub format button that will download an ACSM file, that when opened will invoke Adobe Digital Edition (ADE) to download the DRM protected ePub.

If you then transfer this via ADE onto your Kobo and open it, the page number will be (X) of (Y) within the book!

Here's how I enabled line-spacing (or leading). In that same Look & Feel screen, change "Maximum Line Height" to 0.0%. This effectively disables it and allows leading to be set on the kobo Touch.

Yea, I've found, for the most part, either setting the Maximum Line Height to 0.0% does the trick, and when it doesn't, I strip the line-height CSS from the document (via Look & Feel > Filter Style Information >Other CSS Properties). The odd time though, this results in the leading on the Kobo to be double-spaced though (even when line height is set to the minimum value on the Kobo). In these instances, I've opted to force a regular line height in Calibre (which results in an unmodifiable line height on the device, but at least it looks good for reading).

So, I fired up Calibre and did an ePub > ePub conversion on the file and it For the ePub > ePub conversion, for Page Setup, I used the "Default Input Profile" (as I have no idea what the source actually was) for the input profile, and for the output profile, I choose Kobo Reader.

Can you please tell me where I can find the output profile "KOBO Reader" when I look at the output on the upper right hand side of the convert window I get many choices including lit epub zip etc etc but I dont' see Kobo Reader. Do I need to connect my reader before converting?
thanks so much for your help

Last edited by DoctorOhh; 12-21-2011 at 07:15 AM.
Reason: adde missing end /quote

Can you please tell me where I can find the output profile "KOBO Reader" when I look at the output on the upper right hand side of the convert window I get many choices including lit epub zip etc etc but I dont' see Kobo Reader. Do I need to connect my reader before converting?
thanks so much for your help

I have the same issues. Something I really do not like with ePub to ePub conversion in Calibre is that it adds a given margin for page, but it does that in each html file of the ePub. And it seems there's no way to ask Calibre to not change the margin. Or is there?

For now I'll avoid those kind of conversion, as I don't want my ePub to be edited that much. I would like a way to ask Calibre to not change all my pages with those margin tags.

I prefer the margins to be handled by my Kobo. Beware, I do not talk about the margins that are in the css file, but the margins in the html files Calibre adds... (Page setup option with margins as above, no way to disable this feature)

Thank you so much for this, i've been struggling the past couple days with that as every book looked different and some had very narrow and unmodifiable margins...

This is an old thread and things have changed since then. For example, the page margins are written to a separate style file instead of included in each html file. Also, the margins settings have an extra option. You can set the margins to "No margin" and no margin settings will be put into the converted epub. I find this is the best setting for my Kobo Touch as I can adjust the margins on it.

As i understood it there is a css file inside an epub file that dictates some things such as the margins, disabling the margins during conversion solved the problem for me, now i can control the text on my kobo as i see fit.

As i understood it there is a css file inside an epub file that dictates some things such as the margins, disabling the margins during conversion solved the problem for me, now i can control the text on my kobo as i see fit.

The problem with just disabling the margins in the calibre conversion is that if the epub is viewed on other devices without margin controls then the margins will be zero and too close to the edges. To solve this problem just do the calibre conversion as suggested and disable the margins then open the epub in Sigil and go to the file page_styles.css and change this: