![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,607
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Back Cover- Where am I going wrong
Hello,
In addition to replacing the front cover with a good quality image, I also add a back cover when I also own the paper book. But for some reason, the back cover image does not display correctly even though I use the exact same code as the cover page. The code I use for both back and front in epub is: Code:
<?xml version='1.0' encoding='utf-8'?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <meta name="calibre:cover" content="true"/> <title>Cover</title> <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 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 385 616" preserveAspectRatio="none"> <image width="385" height="616" xlink:href="cover.jpeg"/> </svg> </div> </body> </html> The images below are from Kindle Previewer 3. Front cover is good, but back cover has this large margin all around. I guess it has something to do with setting the cover.jpg as "cover" in the epub. When I upload to iBooks, the back cover displays with the padding. When I convert to Mobi and send to Kindle App on iPad, it also displays the padding. Any idea how I can force the full page view for the back cover? |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
The most probably cause of your issue, is that the back cover has a different size than the front cover and so, the viewport that you defined for the back cover, is wrong. You must change, for the back cover, the following statements:
Code:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 385 616" preserveAspectRatio="none"> <image width="385" height="616" xlink:href="cover.jpeg"/> </svg> Regards Quote:
Last edited by RbnJrg; 09-18-2021 at 08:51 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,607
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Hello @RbnJrg
Thanks for the reply. Both the cover.jpeg and back.jpg are the exact same resolution - 1600x2560 so I would expect that if it works for one, it would work for the other. But I did change those figures to 600x960 (in both locations), which is the same aspect ratio as 1600x2560 and 385x616 and there was no change. I then changed it to 500x960 and then 600x1100 to see if I could get one dimension to completely fill the surface, but no luck. But using the Calibre file preview in the book editing screens, it shows correctly positioned. Any other hints? As a side question, do those figures mean anything on their own, or is it the aspect ratio that is important? If I use 385x616 or 600x960 or 1600x2560 there seems to be no difference in what is displayed. Thanks |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,032
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
One possible factor is that Kindles treat the (front) cover differently from the rest of a book. The cover is displayed full screen while other pages, including full page images, will have margins on all four sides.
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,607
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Yes, that is what I thought as well. I have tried multiple variations of that code in my first post, stripping it all the way back to bare essentials and I still cannot remove that padding.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() https://www.mobileread.com/forums/sh...21&postcount=9 Now, if the OP wants a solution for Kindle, first, the request is in the wrong forum, and second, even if the svg wrapper for the back cover is right, then —as you wrote— always will be margins on all sides of the image. Last edited by RbnJrg; 09-19-2021 at 06:20 PM. |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Kindlebooks don't use xhtml to display the cover image. They use the image itself (defined by OPF properties). So it doesn't matter how an image is wrapped in the source epub; a kindlebook is never going to display a back cover image in the same way the cover image is displayed. There's no way to code the source epub so that the kindle conversion process can be "tricked" into providing a feature it doesn't support.
Last edited by DiapDealer; 09-19-2021 at 02:47 PM. |
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,607
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Thank you Quote:
If it is possible to fix this in epub, I would appreciate the code to use. Thank you. Images below are same book but using the Calibre e-Book reader on my pc. I have also uploaded the scrambled book if anyone wants to check... |
||
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,822
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I made a couple of minor modifications on your scrambled epub. One was to the stylesheet.css
Original: Code:
@page { margin-bottom: 5pt; margin-top: 5pt; } body { display: block; font-size: 1em; margin-top: 0; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; padding-left: 0; padding-right: 0; text-align: justify; } Code:
body { display: block; font-size: 1em; line-height: 1.2; margin: 0 0 0 0; padding: 0 0 0 0; text-indent: 0; widows: 1; orphans: 1; } The other item was to set the ' preserveAspectRatio="none" ' in the cover and backcover files to ' preserveAspectRatio="xMidYMid meet" ' which preserves the cover/backcover aspect ratio though this did give a margin on the left right edges. A personal choice. Last edited by DNSB; 09-19-2021 at 10:53 PM. |
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,607
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Quote:
Thanks for the pointers. So... -no @page entry. The 5pt border is not needed top and bottom by the sounds of it. -Same with the body changes- don't need those margins which I thought you did, but I guess the ereader overrides them and sets its own anyway. -Justify: you then optionally set that in the ereader rather than forcing it in the epub code. -Widows and orphans, does that prevent a new page with 1 line on it which I have seen sometimes? I did read about Widows and Orphans in my early learning days, but it stated it was for printing, so did not think it applied here. I obviously misunderstood. I then made the change preserveAspectRatio="xMidYMid meet" , then saved and viewed in the Calibre e-book reader, but no change to the margins. Then I discovered there was a default 20px margin set in settings. I removed those and the image expanded to the edges (and so did the text pages). I checked on iBooks and it also seems to have expanded to full, though a bit more difficult to tell due to the smaller screen. That is great. Thank you very much for the pointers. And I am open to any other pointers if you came across any in the way I rebuilt the novel. |
|
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,641
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sh...21&postcount=9 Basically, it consist on include the image as a background of the html tag, as follow: Code:
html { background: url("../Images/your_back_cover.jpg") no-repeat center center; background-size: cover; /* this is the key */ height: 100vh; /* here you asure a full viewport */ margin: 0; padding: 0; } body { /* This declaration shouldn't be neccesary except by PocketBook */ background-color: transparent; } a) If your image has, for example, a relation of 4/3 and the ereader has a relation of 16/9, there is no way to avoid blank spaces at top and bottom. Even Kindle shows covers with blanks when the image doesn't have the same with/height relation than the screen reader. b) Not all ereaders, support perfectly an image as background in the html tag. For example, for Android, Readily, Lithium and PocketBook support zero-bleed imagery. But for eink readers, I don't know of any with that capability. In general, readers based on webkit (specially modern versions of webkit) will support images with zero-bleed. It's more doubtful for readers based on RMSDK (Legacy ADE). Last edited by RbnJrg; 09-20-2021 at 07:31 AM. |
|
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,358
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I understand that. But the fact is there's a pretty large overlap for most people. Epubs are tweaked all the time to manage how kindlebooks get created from them. And since the answer was so simple ("You can't"), I chose to answer the question asked instead of worrying about the details. Now that's out of the way and the epub question remains. *shrug*
Last edited by DiapDealer; 09-20-2021 at 02:09 PM. |
![]() |
![]() |
![]() |
#14 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,698
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Elephant in the room?
Paper books need a back to hold the paper in. Naturally the blurb and price is put there. It's significant that listings of ebooks have a cover and then the blurb and price as text. Even sites selling paper books don't usually do it different. They don't want a view of the spine either. That's only for physical shelves.
I can't think why anyone wants the rear of a paper book in an ebook, though if it's for yourself you can add it and not fuss about white space. Very few paper books match phone, tablet or ereader screen aspect ratios. |
![]() |
![]() |
![]() |
#15 | ||||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Quote:
Quote:
Never send a MOBI to an iOS device to preview as a Kindle eBook. The preview is totally worthless; you'll see what is effectively a KF7 (primitive) version of the file. In KP3, convert the file to AZK and then use a USB cable, connected to a computer, connected to iTunes, to go to Sharing--Kindle and drop the AZK file there. (If you search the net, you can find illustrated instructions on this.) Then and only then will you see something remotely close to what a MOBI in K4iOS will look like. ETA: Vis, rear covers in eBooks-here's what I tell my customers: https://www.booknook.biz/ebook-conve...ot-be-embedded Hitch Last edited by Hitch; 09-20-2021 at 03:45 PM. Reason: ETA: Discussion around rear covers... |
||||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bogus takedown notice sent to the wrong person; Harvard Prof. Lessig fights back | Alexander Turcic | General Discussions | 35 | 03-06-2014 07:33 AM |
Wrong Cover Image | Fabe | ePub | 2 | 04-02-2012 09:16 AM |
Wrong cover | clady | Calibre | 8 | 02-05-2011 02:57 PM |
M-Edge sent the wrong cover | daffy4u | Amazon Kindle | 23 | 03-13-2009 02:49 PM |
BD: Cover Art - What am I doing wrong? | edbro | Sony Reader | 24 | 08-22-2007 07:04 AM |