|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Oct 2025
Location: Germany
Device: kobo libra 2
|
change preserveAspectRatio="none" to preserveAspectRatio="xMidYMid meet"
I try to convert epubs with svg-tag in titlepage.xhtml containing the attribute preserveAspectRatio="none" to kepub, altering it to preserveAspectRatio="xMidYMid meet". So I put the following regex in the Search & Replace part of the conversion dialog:
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="none"([^>]+)> to be replaced by <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet"\1> When I look at the resulting kepub it still contains preserveAspectRatio="none" in the svg-tag. What am I doing wrong? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,558
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to set the option to preserve cover aspect ratio in Preferences->Output options->EPUB output IIRC kepub output wil inherit that.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Oct 2025
Location: Germany
Device: kobo libra 2
|
Your hint worked for epub-to-epub-conversion but converting the resulting epub to kepub gets preserveAspectRatio="none".
But I think it doesn't matter. I deleted the kepub and sending the file to Kobo Libra 2 auto-converted it to kepub.epub with preserveAspectRatio="xMidYMid meet". Thank you very much for your help. ![]() |
![]() |
![]() |
![]() |
Tags |
calibre conversion kobo |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. | MarjaE | Library Management | 1 | 03-30-2021 11:46 AM |
Bad Value Attribute "PreserveAspectRatio" | stevej46 | ePub | 5 | 03-31-2013 11:45 AM |
Bad value for "preserveAspectRatio" error! | Guido Henkel | Calibre | 3 | 06-09-2010 01:21 AM |