View Single Post
Old 06-02-2023, 04:29 PM   #4
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,615
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Replace your code with this...

Spoiler:

PHP Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:xlink="http://www.w3.org/1999/xlink">

<head>
  <meta name="calibre:cover" content="true"/>
  <title>Cover</title>
  <style type="text/css" title="override_css">
  @page {
    padding: 0;
    margin: 0;
  }
  body {
    text-align: center;
    padding: 0;
    margin: 0;
  }
  </style>
</head>

<body>

  <div>

    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 1600 2560" preserveAspectRatio="xMidYMid meet">
      <image width="1600" height="2560" xlink:href="../OEBPS/cover.jpg"/>
    </svg>

  </div>

</body>
</html>


You will need to adjust the viewbox and the width and height values to match your cover image dimensions and relink the href: image.

Remember to make a backup first, so you can easily revert if needed.
Karellen is offline   Reply With Quote