Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 07:41 AM   #1
ger
Junior Member
ger began at the beginning.
 
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?
ger is offline   Reply With Quote
Old Today, 07:44 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
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.
kovidgoyal is online now   Reply With Quote
Advert
Old Today, 08:31 AM   #3
ger
Junior Member
ger began at the beginning.
 
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.
ger is offline   Reply With Quote
Reply

Tags
calibre conversion kobo


Forum Jump

Similar Threads
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


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


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