Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2012, 04:37 PM   #16
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by RG1 View Post
During cover image generation the margins you have set in preferences will be added. I have used a class for body to get around this. You can prevent kobos own margins in generated images if you set the preference for margins to zero before adding a book. This will work for books stored in main memory only. (The images for books stored on sd card are generated on-the-fly and are not persistent.)
This explains why the covers are squeezed. It isn't that the publisher is adding the margin, but the kobo is assuming that the same margin that applies to the page applies to the cover (this seems silly, but maybe that is just me).

Unfortunately, with recent firmwares, the cover generation is done on the fly, rather than all at once when books are added. This means that I will either need to either find a way for each publisher's ebooks to set the margins for the cover to 0, so I can adjust the margins as desired when reading and this won't affect the generation of new covers. Or find a way, again for each publisher, to hard-code the margins of each book, except the cover, so I can keep the kobo margin settings at 0 (this may be simpler, but mean's I can't change the margins when reading, which is a pain).
scoobertron is offline   Reply With Quote
Old 10-28-2012, 05:12 PM   #17
MisterBuggie
Enthusiast
MisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura aboutMisterBuggie has a spectacular aura about
 
Posts: 37
Karma: 4388
Join Date: Oct 2012
Device: Kobo Touch
Quote:
Originally Posted by thp1017 View Post
It is the kobo generated thing, with "Book Title [epub]" stamped on it. Definitely all epubs.


Paths are same as before - in one case, the book in question is just the next in a series, so instead of 'Saganami 02: Storm from the Shadows' it is 'Saganami 03: Shadow of Freedom'. First one worked last year when I got it, this one didn't Also I think all are shorter paths than what worked in the past.
I actually only use calibre to convert and clean up the books, I don't bother with the GUI or the kobo driver, never have. I just use rsync to copy new files over. Only at ~850 books at this point, so that shouldn't be a problem.


Yeah, took a quick look at that, and they aren't there. I'd also at one point tried deleting the entries from DB and letting it re-process them, but that isn't fixing it.

Don't get me wrong, this isn't exactly the end of the world, but it'd be nice to know what the heck is going on Thanks for your help!
I was having a similar problem with some of my books. I did a factory reset and no more problems. It's actually quite quick and painless to do, as reading life is now sync'd to your account (I think), the only thing you lose is that it'll show all your books as unread (but I'm crossing my fingers that david will allow us to tie that in to a column in Calibre... )
MisterBuggie is offline   Reply With Quote
 
Advertisement
Old 10-28-2012, 06:03 PM   #18
RG1
***
RG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with others
 
Posts: 24
Karma: 2716
Join Date: Oct 2012
Device: Sony PRST-2, Kobo touch
Quote:
Originally Posted by scoobertron View Post
This means that I will either need to either find a way for each publisher's ebooks to set the margins for the cover to 0, so I can adjust the margins as desired when reading and this won't affect the generation of new covers. Or find a way, again for each publisher, to hard-code the margins of each book, except the cover, so I can keep the kobo margin settings at 0 (this may be simpler, but mean's I can't change the margins when reading, which is a pain).
I use the first way. Covers get zero margins by using a body class for the cover page. No .css stylesheet or page-template is used for the cover page. The styles go directely in the code of the html page.
Code:
  <head>
...
  <style type="text/css">
/*<![CDATA[*/

  @page {padding: 0pt; margin: 0pt;}
            body.nb {padding: 0pt; margin: 0pt;}
  /*]]>*/
  </style>
</head>

<body class="nb">
...
The .css stylesheet for all book chapters have margins set by the publisher. Since the kobo has a known bug and can't use right and left margins for <body>, i have to use padding instead.
Code:
	@page {
		margin-top: 5px;
		margin-bottom: 5px;
	}
	body {
		padding-left: 20px;
		padding-right: 20px;
	}
You can change the margins when reading, since the kobo will add it's own margins in addition to the margins set in the book. The only way to overrule the kobo margins is to use a body class with margin and padding set to 0.

Last edited by RG1; 10-28-2012 at 06:22 PM.
RG1 is offline   Reply With Quote
Old 10-28-2012, 06:11 PM   #19
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by scoobertron View Post
Unfortunately, with recent firmwares, the cover generation is done on the fly, rather than all at once when books are added.
I just checked the impact of this by loading some books onto the kobo, opening the library and browsing a couple of pages with the margins set to 0. The covers generated properly. Once I opened a book and set the margins to a non-0 amount, any new covers generated had margins added, and the cover image was squeezed into the space between the margins - ruining the aspect ratio.
scoobertron is offline   Reply With Quote
Old 10-28-2012, 06:19 PM   #20
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by RG1 View Post
I use the first way. Covers get zero margins by using a body class for the cover page. No .css stylesheet or page-template is used for the cover page. The styles go directely in the code of the html page.
Code:
  <head>
...
  <style type="text/css">
/*<![CDATA[*/

  @page {padding: 0pt; margin: 0pt;}
            body.nb {padding: 0pt; margin: 0pt;}
  /*]]>*/
  </style>
</head>

<body class="nb">
...
The .css stylesheet for all book chapters have margins set by the publisher. Since the kobo has a known bug and can't use right and left margins for <body>, i have to use padding instead.
Code:
	@page {
		margin-top: 5px;
		margin-bottom: 5px;
	}
	body {
		padding-left: 20px;
		padding-right: 20px;
	}
You can change the margins when reading, since the kobo will add it's own margins in addition to the margins set in the book.
I am afraid I don't follow this as my knowledge of html/css is very limited. Most of my books have the same structure as the file I attached earlier in the thread, where the cover is (I believe) handled by a cover.xml file. Is there an easy change I could make to this file which would set the cover margins? (I could then script this to replace this file in all my books with the fixed version)
scoobertron is offline   Reply With Quote
Old 10-28-2012, 06:40 PM   #21
RG1
***
RG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with othersRG1 plays well with others
 
Posts: 24
Karma: 2716
Join Date: Oct 2012
Device: Sony PRST-2, Kobo touch
You can add this code to your cover.xml or cover.html:
Code:
<style type="text/css">
/*<![CDATA[*/

  @page {padding: 0pt; margin: 0pt;}
            body.nb {padding: 0pt; margin: 0pt;}
  /*]]>*/
  </style>
It has to go in the xml or html head before the line with the closing tag </head>. Then you have to change the line with <body> to <body class="nb">
If there is a line starting with <link href="../Styles/ in the head (before </head>) then delete the complete line.
That's it.
An easier way is to copy the cover.xml from the file I attached earlier in the thread and put it in the other books. Make shure that the cover image is named cover.png and resolution is 800x600.

Last edited by RG1; 10-28-2012 at 06:56 PM.
RG1 is offline   Reply With Quote
Old 10-28-2012, 07:57 PM   #22
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,371
Karma: 46288753
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
I wonder if ePubFixer might be of use.
Spoiler:

Quote:
Table of Content Editor
  • Reorder chapters, nest chapters inside others chapter / book and create a multi-level Table of Content by dragging and dropping.
    • When dragging look for the black line to know where your chapters will be.
    • Drag a chapter on an other one until the destination chapter is all black, this will nest the chapters inside each other.
  • Remove unwanted entries, Add new ones based on files or Anchor already present in the files. The Add window will present you with a list of the top 5 lines inside the files (or inclosed with the Anchor Tags) for the Chapter Name.
    • You can also download chapters from the site kobobooks, when there is no suitable text found.
    • Clicking the Add button will add new entries at the bottom, right clicking will add the chapters below the chosen chapters).
    • You can also drag & drop files from the Add windows inside the Table of Content.
  • You can Mass Rename chapters by just typing a number when selecting the chapters, the will increment automatically.
    • You can also Convert number to Words (ie 1 --> One), It also works with Roman Numerals.
    • You can also use the special tag "%T", that will keep the previous text. (ex : You have a Chapter Named : Atlantis, Typing 1 - %T will change the name to 1 - Atlantis). Also if you have a Chapter 1 entry you can just type %T and Number To Words and it will change it to Chapter One.
  • Change the case of the chapters.
  • You can shift the source of chapters up or down (It will Remove any Anchors, pointing to the top of the page).
  • The program can cut your chapter to separate files, instead of multiple chapters per file.
  • Delete files from your book along with any associated entries in the OPF file. (Look in the Add windows).
    • Create an inline TOC from your Table of content.
    • This will check the guide portion of the opf for the "toc" item, and replace it with your new Content file. If this does not exist it will create one at the end, where you can place it where you want.
    • If you want to edit an existing one, you can use the Add window and the Set as Table of Content command, this will set the file and tell the program to replace this file. Or you can use Sigil and the "Add Semantic" button and Table of Content.
Reading Order Editor
  • Have you ever opened a book to find out the first page is at the end? You can reorder the order of the book pages or just remove some.
  • Using this will also remove any "linear" tags inside the books that makes some chapters appear at the end.
  • This will also recreate the file when there is no reference to you toc inside it, which makes some Table of Content unusable. (A message will popup tell you if it is the case.
Margin Fixer
  • This will change all the left and right margins value of the css file, while keeping the body tag to 5pt. It will also change any indent that are negative to 0 (Be careful because some books use margins, instead of indent and it could remove them).
  • An option in the setting menu will let you remove margins instead of zeroing them, usefull with the Kobo Touch when margins can not the modified in book. Use this to remove them and it will remove all margins from the body style.
Edit in Sigil
  • Sigil is great to cut chapters, Format the text or to correct some incorrectly cut files, but it is missing a very important function (at least before version v0.4 comes out). It does not keep the Table of Content that is already present. Using this the book will be opened with Sigil, and when closed (be sure to save the file at the same place) it will replace it with your old Table of Content, Updating the new files location. If you delete or add new Files be sure to also run the table of Content & Reading Order Editor after it. It will check for any files that are missing when opening and remove them, so just open it and save it again to remove entries.
  • You can also use any external exe, it will work also.
Cover Editor
  • Change the Cover without having to reconvert your file (Like calibre does)(Note that using this will convert your covers to SVG).
    • There is also a from folder button that will take the cover.jpg file that is next to the ePub (useful with calibre, where you can download a new cover, and change it by clicking from folder)
  • Resize the Cover so that it fits the screen of your eReader.
    • Note that this has been tested on the Kobo Touch, it resizes the cover in a way that will have the Kobo created a cover without borders, but it might look weird in other viewer like calibre, etc (because it forces a Screen of 800 X 600)
  • Update all will use the selected settings for all the book that where selected, useful too update multiple covers at once.
  • Note that if the Cover is not explicitly set inside the opf file, it will use the first file in the book. (You can set it in the Add window)
PeterT is offline   Reply With Quote
Old 10-29-2012, 12:32 AM   #23
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 6,090
Karma: 6238033
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
Quote:
Originally Posted by scoobertron View Post
Unfortunately, with recent firmwares, the cover generation is done on the fly, rather than all at once when books are added. This means that I will either need to either find a way for each publisher's ebooks to set the margins for the cover to 0, so I can adjust the margins as desired when reading and this won't affect the generation of new covers. Or find a way, again for each publisher, to hard-code the margins of each book, except the cover, so I can keep the kobo margin settings at 0 (this may be simpler, but mean's I can't change the margins when reading, which is a pain).
The Kobo Touch/Glo/Mini driver in calibre has options to generate the cover images and send them to the reader when it sends the book. The cover images are generated from the calibre metadata and are stretched so there won't be any bars down the sides. This only works for books in the main memory. Also, it only generates the images that are appropriate for the firmware version.
davidfor is offline   Reply With Quote
Old 10-29-2012, 06:53 AM   #24
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by davidfor View Post
The Kobo Touch/Glo/Mini driver in calibre has options to generate the cover images and send them to the reader when it sends the book. The cover images are generated from the calibre metadata and are stretched so there won't be any bars down the sides. This only works for books in the main memory. Also, it only generates the images that are appropriate for the firmware version.
If it dumps all the images in the .kobo/images folder, then it won't be able to store enough images for a large library of books as there is a limit to how many files are permitted in the images folder (7-8000ish as I recall). This is what I was doing originally, but with 3000 books, and 3 images needed for each, it was over the limit of allowed images.
scoobertron is offline   Reply With Quote
Old 10-29-2012, 07:02 AM   #25
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by PeterT View Post
I wonder if ePubFixer might be of use.
Spoiler:


This was something I was going to have a look at if I couldn't work it out on my own. The only reason I was hesitent was that it seemed to do a lot more than I needed, and meant installing mono on linux, which was a bit of a big dependency for a relatively small issue, and I wasn't sure how scriptable it was as I would want to process all my books at once.
scoobertron is offline   Reply With Quote
Old 10-29-2012, 07:03 AM   #26
scoobertron
Connoisseur
scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.scoobertron ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 349476
Join Date: Jul 2012
Device: Kobo touch
Quote:
Originally Posted by RG1 View Post
You can add this code to your cover.xml or cover.html:
Code:
<style type="text/css">
/*<![CDATA[*/

  @page {padding: 0pt; margin: 0pt;}
            body.nb {padding: 0pt; margin: 0pt;}
  /*]]>*/
  </style>
It has to go in the xml or html head before the line with the closing tag </head>. Then you have to change the line with <body> to <body class="nb">
If there is a line starting with <link href="../Styles/ in the head (before </head>) then delete the complete line.
That's it.
An easier way is to copy the cover.xml from the file I attached earlier in the thread and put it in the other books. Make shure that the cover image is named cover.png and resolution is 800x600.
This works great. Thanks for helping me get this sorted.
scoobertron is offline   Reply With Quote
Old 10-29-2012, 12:53 PM   #27
Nigol
Groupie
Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.Nigol ought to be getting tired of karma fortunes by now.
 
Nigol's Avatar
 
Posts: 182
Karma: 363616
Join Date: Dec 2010
Location: Montreal, Canada
Device: Kobo Original, Kobo Touch
Quote:
Originally Posted by PeterT View Post
I wonder if ePubFixer might be of use.
Spoiler:


Yes it will, it basically modifies the cover to have a 0 margins, by deleting any reference to the CSS and adding the information about the margins inside the page. It also coverts it to a SVG image, because in my test it was easier to fit. Also resizes the image to your requested Aspect ratio like you already did.

I have 500 books on my reader and all have correct Covers.

Sorry about the Linux thing, I coded that for myself at the beginning with .NET and have done some very limited testing in Linux. But I though that most distro already included Mono.

Maybe A VM would be better?
Nigol is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cover image isn't displaying as cover image Eugene88 Sigil 3 08-15-2012 05:05 PM
cover image lionelsnod Feedback 0 02-10-2012 08:51 AM
cover image jjh76 Calibre 3 12-30-2011 07:29 AM
Cover Image Todd Young Writers' Corner 3 09-20-2011 06:16 PM
Cover Image Padr49904 Sigil 7 05-07-2011 07:59 PM


All times are GMT -4. The time now is 12:35 PM.


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