Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 10-09-2014, 03:41 AM   #196
beedaddy
Zealot
beedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoon
 
Posts: 146
Karma: 131606
Join Date: Oct 2011
Location: Germany (south-west)
Device: Kobo Clara 2E, Tolino shine 4
@davidfor: I couldn't reproduce it with an other, free, book. So I'll send you a PM...
beedaddy is offline   Reply With Quote
Old 10-09-2014, 09:03 AM   #197
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@beedaddy: I have the sample and can reproduce the problem.

The problem is in how the stylesheet is processed. It is parsed by the CSS parser that calibre uses and the rules from the file added. Then it is written back to the epub and that is copied to the device. As part of this, the CSS is cleaned up and reformatted. The cleaning includes removing any styles that have no attributes. The reformatting adds or removes whitespace and changes number from ".8" to "0.8". None of this should be harmful and neither version shows any errors. This is the same as using the calibre editor to beautify the CSS.

But, on the device, the stylesheet is being ignored. That means that the RMSDK is seeing an error in the stylesheet and throwing it away. This also happens when I open the epub with ADE. The unchanged epub is fine in both places. But, let the driver add the styles, or beautify with the editor, and it is broken in both place.

I can't see what is wrong with the modified version. I have gone through both version of the stylesheet and can't see what would be causing the problem. I have extracted the original stylesheet and attached it. Hopefully someone can see what the problem is.

The workaround is to turn the modify CSS option off and edit the book and add widows/orphans to the stylesheet. When I did that, the sample displayed correctly.

Last edited by davidfor; 10-10-2014 at 05:52 AM. Reason: Removed stylesheet.
davidfor is offline   Reply With Quote
Advert
Old 10-09-2014, 09:17 AM   #198
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by davidfor View Post
I have extracted the original stylesheet and attached it. Hopefully someone can see what the problem is.
Where is the attached stylesheet (please attach both the working and non-working versions)? I'll take a look at it if I can find where it's been attached.
JSWolf is offline   Reply With Quote
Old 10-09-2014, 09:27 AM   #199
beedaddy
Zealot
beedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoonbeedaddy knows that there *is* no spoon
 
Posts: 146
Karma: 131606
Join Date: Oct 2011
Location: Germany (south-west)
Device: Kobo Clara 2E, Tolino shine 4
To be honest, I'm not happy with attaching the css of a non-free book.
beedaddy is offline   Reply With Quote
Old 10-09-2014, 09:27 AM   #200
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
Where is the attached stylesheet (please attach both the working and non-working versions)? I'll take a look at it if I can find where it's been attached.
Whoops. Apparently you can't attach a stylesheet and I didn't pay attention. I have added it as a zip file.
davidfor is offline   Reply With Quote
Advert
Old 10-09-2014, 09:58 AM   #201
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
This stylesheet contains 3 occurrences of !important. You could try surgically removing them. I've had enough trouble with this in the past that I now always remove them before sending to a Kobo. If the css is well-designed it should never be needed anyway (IMO ). I've had numerous occurrences of an epub displaying on a Kobo as if none of the css was being used, i.e. everything left-aligned, no paragraph indents, 'blank line' between every paragraph. When I've opened up the epub to investigate it has always contained at least one !important. Removing them has always fixed my problem.

BTW, in addition, there doesn't seem to be a space before !important which I would have thought is an error, e.g.
Code:
div.abbildung.with_thumbnail p.link_toFullsize {
text-align:left;
text-indent:0!important;
}

Last edited by jackie_w; 10-09-2014 at 10:03 AM.
jackie_w is offline   Reply With Quote
Old 10-09-2014, 06:38 PM   #202
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
This stylesheet contains 3 occurrences of !important. You could try surgically removing them. I've had enough trouble with this in the past that I now always remove them before sending to a Kobo. If the css is well-designed it should never be needed anyway (IMO ). I've had numerous occurrences of an epub displaying on a Kobo as if none of the css was being used, i.e. everything left-aligned, no paragraph indents, 'blank line' between every paragraph. When I've opened up the epub to investigate it has always contained at least one !important. Removing them has always fixed my problem.

BTW, in addition, there doesn't seem to be a space before !important which I would have thought is an error, e.g.
Code:
div.abbildung.with_thumbnail p.link_toFullsize {
text-align:left;
text-indent:0!important;
}
Yes, I thought of those. But, I couldn't see why they would cause the problem after a calibre editor beautify was run on it. I'll try removing them tonight to see what happens.
davidfor is offline   Reply With Quote
Old 10-09-2014, 06:55 PM   #203
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by beedaddy View Post
To be honest, I'm not happy with attaching the css of a non-free book.
There is nothing wrong with attaching the CSS of a commercial eBook and the staff at MR won't have a problem.
JSWolf is offline   Reply With Quote
Old 10-09-2014, 06:56 PM   #204
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
delete post

Last edited by JSWolf; 10-09-2014 at 07:02 PM.
JSWolf is offline   Reply With Quote
Old 10-09-2014, 07:01 PM   #205
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
One thing to do is use Calibre's eBook editor to remove all unused classes. That way if any of the unused classes is causing a problem. Even if that doesn't work, it will mean less classes to have to try to debug.

davidfor, please try this and see if things work. If not, please post the working CSS and the broken CSS (both after unused classes have been removed).
JSWolf is offline   Reply With Quote
Old 10-10-2014, 05:51 AM   #206
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
One thing to do is use Calibre's eBook editor to remove all unused classes. That way if any of the unused classes is causing a problem. Even if that doesn't work, it will mean less classes to have to try to debug.

davidfor, please try this and see if things work. If not, please post the working CSS and the broken CSS (both after unused classes have been removed).
Jon, guess what one of the first things I tried was? But, it doesn't really help solve the problem. I only have a small sample of the the book, so I don't know which classes are unused in the rest of the book. To find what is causing the problem, I have to remove the classes one at a time, do a beautify and test. Luckily, ADE shows the problem as well, so I don't have to keep putting it on a device.
davidfor is offline   Reply With Quote
Old 10-10-2014, 06:00 AM   #207
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: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by beedaddy View Post
To be honest, I'm not happy with attaching the css of a non-free book.
I've removed the file. It shouldn't cause a problem, but, it is your book, so your wishes are more important.
davidfor is offline   Reply With Quote
Old 01-09-2015, 09:44 AM   #208
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
First of all, sorry for digging up a relatively stale thread... .

Given the terrible rendering of covers in sleep mode, I quickly enabled the "B&W Covers" setting, but when that didn't help much, I took a look at the code: it basically just does what's on the tin, without dithering it down to the eInk 16 shades of grey palette.

Since I was in a hurry, I took a very dirty approach and applied this simple patch to the Calibre sources:

Code:
diff --git a/src/calibre/utils/magick/draw.py b/src/calibre/utils/magick/draw.py
index 73832a1..d0793c4 100644
--- a/src/calibre/utils/magick/draw.py
+++ b/src/calibre/utils/magick/draw.py
@@ -75,6 +75,7 @@ def save_cover_data_to(data, path, bgcolor='#ffffff', resize_to=None,
 
     if grayscale:
         img.type = "GrayscaleType"
+        img.quantize(number_colors=16, dither=1)
         changed = True
 
     if resize_to is not None:
It's dirty as hell, but it appears to be doing the job just fine. (Granted, the quantization step is expensive and appears to block the GUI, but, it works, I can now look at book covers without making my eyes bleed ;p).

I'm basically just throwing the idea out there to see if there's a way to handle that more gracefully .

[Granted, my opinionated position on this issue most likely stems from the pains I took to do it right with the Kindle's ScreenSavers hack ]
NiLuJe is offline   Reply With Quote
Old 01-09-2015, 11:48 AM   #209
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3


@ NiLuJe, Are my eyes deceiving me Has the community Kindle developer supremo really decided to dip his toes in Kobo H2O waters?

Well, whatever prompted your decision, welcome I hope you enjoy it and that the rest of us can look forward to more creative work from you, to add to the fabulous work of davidfor et al.
jackie_w is offline   Reply With Quote
Old 01-09-2015, 02:02 PM   #210
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@jackie_w: I dunno, it was winter, it was cold and grey, people kept asking me what I wanted for Christmas, the Voyage isn't available in France, the 5.6.1 update pissed us off, I broke down and went "What the hell!". .

I'm not terribly thrilled with either set of devices so far, but it's been interesting nonetheless ^^. (Also: an amazing new way to procrastinate! ^^)

Last edited by NiLuJe; 01-09-2015 at 02:04 PM.
NiLuJe is offline   Reply With Quote
Reply

Tags
kobo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
firmware update for kobo netronix device JDC Netronix 1 08-22-2014 05:33 AM
Error communicating with device - Kobo eReader after 0.8.56 update PoignantTuna Devices 3 06-21-2012 05:48 AM
[Device Interface Plugin] Update for Nook Color Driver jmricker Plugins 0 10-22-2011 10:11 AM
Kobo Desktop erased entire device database! - Don't dowload update MrsJoseph Kobo Reader 9 03-23-2011 11:38 AM
Sync Problems- Device status doesn't update to Kobo desktop... Wipes my bookmarks dashto Kobo Reader 1 11-26-2010 01:35 PM


All times are GMT -4. The time now is 10:13 PM.


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