|
|
#1 |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
Bulk CSS Edit?
Hi,
I'm trying to work through the issue of stretched covers showing on my Kobo Libra Colour. I've come from having a Kindle, where all covers looked fine. I have spent two full days trying to solve this issue, and I've been through every piece of advice I could find on the internet but nothing helped until I finally had a breakthrough (ChatGPT would you believe) and by entering into the book editor, clicking on the title page and changing the CSS from 'keep aspect ratio' from 'none' to 'yes', that has been the only thing that has worked. But, I need to do this for my whole library, and I can't figure out a way to do this bulk. If I select a number of books and open Editor, it just opens a window for each of the books. I have quite a big library (1000+) but I can't seem to figure out how to assign 'yes' to aspect ratio within the CSS for all books at once. So grateful for any help, starting to lose the plot. |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,859
Karma: 245111335
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
Did you try checking the box "Keep cover aspect ratio" in the Kobo driver settings?
|
|
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
Yes, I've tried all the things I could within the menus for keeping aspect ratio, and I've tried polishing, and updating metadata, etc. Nothing has worked except changing the CSS. I'm not familiar enough with CSS to understand all this. I really hoped there would just be a quick solution to this. I can't change CSS individually though for all the books, it would take too long. And I'd also have to do that for every new book I'd put on, too. There must be an easier way.
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,794
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Ensure the value is set as this... preserveAspectRatio="xMidYMid meet" Not sure about your comment "none" to "yes" and where you are changing that. When importing an ebook into Calibre, you are given the option to preserve the cover image aspect ratio. You obviously have this unselected. See image... As for batch editing all books in your library to fix this problem, I have no idea if that is possible. |
|
|
|
|
|
|
#5 | |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
Quote:
To answer your question, where you said to set value to 'xMidYMid', that is where I was putting in the word 'yes' and it worked. Thank you for the picture. My oversight is due to the fact that when I originally converted all azw3 files to epub a week ago, and then transferred the epubs into new library, I haven't had to convert anything since then as books are auto converted to kepub on transfer. So, I haven't thought to look back into the convert section. I'd put the face palm emoji here if I had the option. Anyway, egg on face, but thank you so much. |
|
|
|
|
|
|
#6 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,484
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I have a very simple solution that will work very well. Use the Modify ePub plugin. There is an option to insert or replace the cover. IT does as little as possible to change any of the code. See the screen grab to see what the option is you'd need to select in order to fix the cover. You can do this for multiple ePub in one go. It works very well. It will keep the correct aspect ratio. This is the best solution for updating the cover for ePub.
|
|
|
|
|
|
#7 | |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,484
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#9 |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
I am now re-converting my original azw3 library to epub with the aspect ratio box firmly checked.
In future, when I have epub books to begin with (that don't need converting) would I still convert from epub to epub just so I could check that aspect ratio box? And if so, do I lose anything in the file by converting to the same format again? Thanks. |
|
|
|
|
|
#10 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,794
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
![]() You learn and move on. No idea why "yes" works. I guess it is some good error handling by the ereader software. More info... https://developer.mozilla.org/en-US/...rveAspectRatio As for converting and reconverting. I guess it introduces more and more code in the ebook. In some simple books I have edited that have used only 4 css styles, after conversion I end up with 15+ styles. So I would avoid the re-conversions. |
|
|
|
|
|
|
#11 | |
|
Enthusiast
![]() Posts: 29
Karma: 10
Join Date: Jul 2018
Device: Kindle Voyage, Kobo Libra Colour
|
Quote:
![]() So, if not re-converting, do I have to opt for inserting the value you already spoke about in the 'preserveaspectratio' area, for every individual book? |
|
|
|
|
|
|
#12 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,794
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Yes, best to do it manually. And I am referring to the epub to epub conversions.
Your azw to epub conversions are first generation conversions so you can reconvert without harm. Maybe try jswolf method. I can’t advise on that as I’ve never used that method or plugin. |
|
|
|
|
|
#13 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,484
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#14 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,493
Karma: 32600658
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
|
|
|
|
|
#15 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,484
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bulk edit SVG | ElMiko | Calibre | 3 | 11-30-2025 02:28 PM |
| How to bulk edit identifiers? | stardot | Library Management | 1 | 01-07-2021 03:14 PM |
| Bulk Edit Title | tarisea | Library Management | 2 | 04-19-2018 01:11 AM |
| Bulk edit of identifiers | rmagere | Library Management | 4 | 02-19-2012 04:10 AM |
| Bulk metada edit error trying to edit tags | Purple Lady | Calibre | 8 | 02-17-2011 06:09 PM |