01-30-2021, 10:50 AM | #1 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Google Play Books and a CSS-specific error
Hello!
I'm writing this post to share something I discovered and hopefully understand styles a bit more than before. I have a calibre collection that from time to time I manually sync to Google Play Books to read on the go; yesterday I tried to add a new (perfectly working in calibre) EPUB3 file to Play Books, only to get a generic "Upload failed" error. This without any debug information, but hey, it's Google... I read the help page here and I checked my file with epubcheck, which gave me this error: Code:
ERROR(RSC-005): ./filename.epub/OEBPS/Text/cover.xhtml(22,58): Error while parsing file: value of attribute "height" is invalid; must be an integer Code:
<img alt="" height="100%" src="../Images/cover.jpg"/> Code:
<img src="images/cover.jpg" style="height: 100%;"/> Ta-da! Google accepts the file without any problem. I've written this for two reasons:
What is wrong with the first way of using the height tag? I have at least a few books that use it, with no problems from the calibre viewer and Adobe Digital Editions. If somebody could explain it to me it'd be very helpful |
01-30-2021, 01:14 PM | #2 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
<img height=...> is HTML, <img style="height:..."> is CSS (I mean the height part is CSS).
In HTML height is a number, in pixels, don't use it. In CSS height can have many units. |
01-30-2021, 01:30 PM | #3 | |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
Quote:
Thinking back I think I caused the problem by updating from EPUB2 to EPUB3 with calibre, it left behind some tagging problems. Later I dug some more in my files and I found similar "update caused" problems like in table borders (e.g. a table can't have the HTML tag border=0 anymore) and in the alt="" inside an <svg><image> tag, that was considered wrong in EPUB3 but not in EPUB2. I resolved them manually, but I wonder if I should point them out in the calibre bug tracker, as their origin is probably the book editor. There are problems only with strict interpreters like Google Play Books though, so it's not very important |
|
01-30-2021, 06:12 PM | #4 |
the rook, bossing Never.
Posts: 12,267
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Also use a real Android App, not Google Playbooks, which is tied to the Playstore and requires the Google Framework. It's not a standalone Android App.
Lithium is far better. I only use Playbooks for books FROM Google. |
01-31-2021, 01:56 PM | #5 |
Enthusiast
Posts: 47
Karma: 10
Join Date: Jan 2021
Location: Italy
Device: Kobo Libra 2, Kindle Paperwhite (1st gen)
|
The thing is, I really like having synced books and reading point that Play Books offers, even if it means not having advanced options. I quite like their font, Literata, so it's a nice solution for me. I looked up Lithium though and I like it so thank you for the info, I'll give it a try
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CSS in Google Play Books vs Nook and others | codys | ePub | 8 | 07-19-2019 09:47 PM |
ADE and Google Play Error | Apparition B5 | General Discussions | 15 | 06-08-2018 07:56 AM |
Kindle Previewer: error converting from epub with specific CSS and `display: none` | arthurattwell | Kindle Formats | 3 | 08-10-2016 08:42 AM |
Epub3 CSS not implemented on Google Play Books | leijoninna | ePub | 0 | 04-11-2014 08:45 AM |
Google play download unsuccessful error | Dingo | enTourage eDGe | 1 | 04-04-2012 12:31 PM |