Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2023, 06:29 PM   #1
CrankyLamb
Junior Member
CrankyLamb began at the beginning.
 
CrankyLamb's Avatar
 
Posts: 6
Karma: 10
Join Date: Dec 2023
Device: none
How do I center the cover photos of my ePub files and make them fit the entire page?



Many of my eBooks have cover photos that appear too large, too small (thumbnail), and/or are not positioned at the center of the page.

How do I fix that ?


I often change the covers of my eBooks when they are too low-res for my liking. And what happens frequently is that when I add the new cover, it appears as a thumbnail when I open it in Adobe Digital Editions.

On the flip side, by default a lot of the covers of my eBooks are high-res, but do not fit the page.

And lastly, regardless of size a lot covers appear on the left or the right, instead of the center which is what I want.


A perfect cover page for me looks like this:



1. It is placed at the center
2. It fits the entire page


How do I achieve that in Calibre?

Thank you.

PS: Just want to let everyone know that I know nothing about coding. I'm a total newbie to it, and frankly find it very intimidating, so please explain to me like I'm 5 if instructing require coding.
CrankyLamb is offline   Reply With Quote
Old 12-27-2023, 09:02 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,229
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Try wrapping your cover image in a svg wrapper. The ModifyEpub plugin for calibre uses the following code:

Code:
        <style type="text/css" title="override_css">
            @page {padding: 0pt; margin:0pt}
            body { text-align: center; padding:0pt; margin: 0pt; }
        </style>
    </head>
    <body>
        <div>
            <svg version="1.1" xmlns="http://www.w3.org/2000/svg"
                xmlns:xlink="http://www.w3.org/1999/xlink"
                width="100%" height="100%" viewBox="0 0 1125 1500"
                preserveAspectRatio="xMidYMid meet">
                <image width="1125" height="1500" xlink:href="images/cover.jpeg"/>
            </svg>
        </div>
Please note that the 1125 x 1500 are the dimensions of the cover image and should match the cover image dimensions.
DNSB is offline   Reply With Quote
Advert
Old 12-27-2023, 09:32 PM   #3
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,088
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Or you can use the Tools>Add Cover option which will create the cover page and add the code.
Karellen is offline   Reply With Quote
Old 12-28-2023, 08:03 AM   #4
lomkiri
Zealot
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 131
Karma: 1000102
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by Karellen View Post
Or you can use the Tools>Add Cover option which will create the cover page and add the code.
... just think in checking the option "Preserve ratio"
To be noted : adding a cover automatically removes the old one, so this is a very practical way to have the cover fitting in the page.

@ CrankyLamb :
Be aware that in the menu tools, there is also a very handy tool : "Compress images lossless" (lossly is also possible), that can reduce notably the size of the jpgs (if you choose to compress lossly).

Last edited by lomkiri; 12-28-2023 at 08:19 AM.
lomkiri is offline   Reply With Quote
Old 12-28-2023, 10:51 AM   #5
CrankyLamb
Junior Member
CrankyLamb began at the beginning.
 
CrankyLamb's Avatar
 
Posts: 6
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by lomkiri View Post
... just think in checking the option "Preserve ratio"
To be noted : adding a cover automatically removes the old one, so this is a very practical way to have the cover fitting in the page.

@ CrankyLamb :
Be aware that in the menu tools, there is also a very handy tool : "Compress images lossless" (lossly is also possible), that can reduce notably the size of the jpgs (if you choose to compress lossly).
Thank you all for taking the time to respond. I appreciate the solutions you have suggested, but they don't seem to work. I also want to remind everyone that I don't know anything about code, and am a very much a newbie to it, so all this SVG talk is confusing to me. I prefer GUI, and I find CLI and code extremely intimidating.

All that being said, I am aware of the Tools>Add Cover option to create the cover page and automatically add the code, as @Karrellen suggested. I've used it for years, but it doesn't always work.

Moreover, I want to point to @DNSB that using the Tools>Add Cover option, automatically adds the SVG wrapper, which I haven't the remotest idea what it's for, but I consistently see it in the code.


TEMPORARY (?) SOLUTION FOUND:

I may have found an easy temporary solution which seems to work, but I have no idea how, why, or for how long.

When I started searching for solutions to this problem, I incidentally came across this thread, which suggests that some later versions of Adobe Digital Editions (ADE) have a bug that causes it to mishandle SVG wrappers.

I don't know exactly what that means, but I understand it to mean that it's the reason why my covers don't appear the way that I want them to (centered, filling the page, by preserving the aspect ratio).

In that thread discussion, someone suggested replacing the height and width % with vh and vw respectively.

Specifically, that means replacing:

width=100% with width=100vw

and

height=100% with height=100vh.

The only thing that changes is the "%" character being replaced by "vh" and "vw".

I don't know what those mean, but it seems to work.

I just hope I don't run into problems later. I manage my entire eBook library in Calibre, but ADE is my default ePub reader on my desktop. The reason for that is it allows me to verify if my eBooks are formatted the way I want them to, and specifically in this case, if the cover appears how I want it to.

I'm on the latest version of ADE, v. 4.5.12, which was released in April of this year. I always update when there is a new release, and it's possible that in the future, my covers won't appear correctly because of the temporary solution I took. I hope that doesn't happen because I have thousands of eBooks and having to manually change the code twice would be very frustrating.

If you guys have other suggestions or additional commentary, I'm all ears. THANKS AGAIN!
CrankyLamb is offline   Reply With Quote
Advert
Old 12-28-2023, 11:22 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,858
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
What are you going to be using to read your ePub?
JSWolf is offline   Reply With Quote
Old 12-28-2023, 11:53 AM   #7
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,024
Karma: 85555555
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Or if publishing, what will most people read on?
Quoth is offline   Reply With Quote
Old 12-28-2023, 12:36 PM   #8
CrankyLamb
Junior Member
CrankyLamb began at the beginning.
 
CrankyLamb's Avatar
 
Posts: 6
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by JSWolf View Post
What are you going to be using to read your ePub?
My default ePub reader used to be my iPad, where I used Apple Books, but since it was stolen, I've been reading on my Android phone. I use Google Play Books. I do intend to purchase an iPad again in the near future though.
CrankyLamb is offline   Reply With Quote
Old 12-28-2023, 12:47 PM   #9
Paulie_D
Connoisseur
Paulie_D began at the beginning.
 
Paulie_D's Avatar
 
Posts: 67
Karma: 10
Join Date: Apr 2011
Device: Kindle 3, Samsung Tab 4
Quote:
The only thing that changes is the "%" character being replaced by "vh" and "vw".

I don't know what those mean, but it seems to work.
"vh" & "vw" stand for viewport height and viewport width and each "v" unit is equal to 1% respectively
Paulie_D is offline   Reply With Quote
Old 12-28-2023, 03:17 PM   #10
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,229
Karma: 145277352
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Also note that vh & vw are only supported for epub3. Later versions of ADE will display epub3 but are not even close to feature complete.
DNSB is offline   Reply With Quote
Old 12-28-2023, 04:39 PM   #11
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,024
Karma: 85555555
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by CrankyLamb View Post
My default ePub reader used to be my iPad, where I used Apple Books, but since it was stolen, I've been reading on my Android phone. I use Google Play Books. I do intend to purchase an iPad again in the near future though.
Pocketbook (good TTS) or Lithium (free Android apps) are both far better than the Google Play Books (Spyware, only needed for DRM titles from Google's Playstore Book section).
Or Aldiko Basic or Bluefire for older Androids that can't install Pocketbook or Lithium.

The vh and vw won't work on loads of Apps and ereaders.
Quoth is offline   Reply With Quote
Old 12-28-2023, 05:19 PM   #12
CrankyLamb
Junior Member
CrankyLamb began at the beginning.
 
CrankyLamb's Avatar
 
Posts: 6
Karma: 10
Join Date: Dec 2023
Device: none
Quote:
Originally Posted by Quoth View Post
Pocketbook (good TTS) or Lithium (free Android apps) are both far better than the Google Play Books (Spyware, only needed for DRM titles from Google's Playstore Book section).
Or Aldiko Basic or Bluefire for older Androids that can't install Pocketbook or Lithium.

The vh and vw won't work on loads of Apps and ereaders.

Android ePub readers suck...

We're veering off-topic here, but I'm planning to start a thread to find the best ePuB readers on Android, because as far as I'm concerned, they're all trash. My eBook reading journey began on Apple Books (previously called iBooks) where the UI and UX were outstanding.


...Even Google Play Books

For years, I have been trying to find an Android App that comes close to it, and they all suck. Even Google Playbooks. I use Google PlayBooks because it comes the closest to Apple in terms of UI & UX, but it's still bad.

First, there's the spying that you hinted at. But also, I hate the fact that I have to upload my own ebooks to Google Drive in order to read them. It's ridiculous! I should be able to import files and read without an internet connection. And although Google PlayBooks sucks, all the other Android ePub readers don't even come close to it in terms of UI & UX. They are so much worse.

UI & UX are greatly important to me.

Between a feature rich app with poor UI & UX, and an app that has fewer features with great UI & UX, I'm almost always going to lean on the latter. All the Android ePub readers are ugly AF. Google Play Books is by far the sleekest.

Months or maybe even a year ago, Aldiko had a major update, that in terms of UI & UX seemed promising, but I tried it and it's so clunky. Plus, they don't have the turning page animation, which is a must for me.


CONCLUSION:

I have little doubt that most of you strongly disagree with me, but yeah, I'm super picky. I know that Apple has its own issues too, but if Apple Books existed on Android, I would be happy. I hate that, overall, iOS seems to have a far better quality of apps than Android.

It's almost as if only huge billion-dollar corporations are cable of making great apps, which we all know is not true, but as far as ePub reader apps are concerned, it seems to be the case and I hate that. I'm still waiting for a great Android ePub reader app.
CrankyLamb is offline   Reply With Quote
Old 12-29-2023, 05:32 AM   #13
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,024
Karma: 85555555
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
Quote:
Originally Posted by CrankyLamb View Post
Android ePub readers suck...

We're veering off-topic here, but I'm planning to start a thread to find the best ePuB readers on Android, because as far as I'm concerned, they're all trash.
Most are, not just the GUI either.
Quoth is offline   Reply With Quote
Old 01-03-2024, 05:46 PM   #14
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by CrankyLamb View Post
[...] the SVG wrapper, which I haven't the remotest idea what it's for, but I consistently see it in the code.
See my response + sample images in:

Quote:
Originally Posted by CrankyLamb View Post
Android ePub readers suck...

We're veering off-topic here, but I'm planning to start a thread to find the best ePuB readers on Android, because as far as I'm concerned, they're all trash.
Yep. For the most part, Android is full of many non-standards compliant "EPUB" readers out there. They throw away the book's code and completely override with their settings... so formatting like poetry (negative indents) or scenebreaks get destroyed.

For more talk about that, see the discussion in:

There are Android apps that are very good + do follow the standards though. For example, I personally use:
  • PocketBook Reader

There are also quite a few good Android apps that RbnJrg mentioned/lists over the years too.

Quote:
Originally Posted by CrankyLamb View Post
I'm still waiting for a great Android ePub reader app.
Or just buy a physical e-ink device. Then you'll have the best experience, like many readers here on MobileRead! Reading stuff on my Kobo is awesome.

Last edited by Tex2002ans; 01-03-2024 at 05:58 PM.
Tex2002ans is offline   Reply With Quote
Reply

Tags
calibre 7.28, cover, cover art, epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Smashwords error report:Please make your cover image the very first page of your EPUB slicknick001 ePub 2 01-12-2014 05:03 PM
Images fit page as mobi, but not ePub Mat Ward ePub 2 12-19-2012 11:48 PM
Can't make cover the first page in epub Ripplinger Sigil 3 11-07-2012 03:21 PM
ePub files do not center a custom <hr /> tag! Haidon ePub 2 08-21-2010 04:29 AM
How to center/fit page width SVG images with <OBJECT> amoroso ePub 0 07-31-2010 11:48 AM


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


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