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 01-31-2021, 09:36 PM   #1
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Help! Small white margin is not dissapear on full-page img

Hi, I have view multiple of the post and try to find a way to get rid of the small white line in when I try to convert epub to pdf. the image seem fine at first glance but when zoom in at the bottom of the page, the small white line would be visible.
Here is my code (see full code in Txt file)

<head>
<title>part0001</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="../stylesheet.css" rel="stylesheet" type="text/css"/>

<style type="text/css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>

<body>
<div>
<img <img alt="Image" src="image_rsrc2GE.jpg" width="1358" height="1920"/>
</div>
</body>
</html>
Attached Thumbnails
Click image for larger version

Name:	p2.PNG
Views:	152
Size:	253.2 KB
ID:	185132   Click image for larger version

Name:	p1.PNG
Views:	133
Size:	37.9 KB
ID:	185133   Click image for larger version

Name:	Output.PNG
Views:	143
Size:	61.4 KB
ID:	185138  
Attached Files
File Type: txt Stylesheet.txt (559 Bytes, 104 views)
File Type: txt image code.txt (529 Bytes, 121 views)
piyarad27 is offline   Reply With Quote
Old 01-31-2021, 10:21 PM   #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: 43,973
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you want full screen images use SVG, there is an axample of th emarkup here: https://manual.calibre-ebook.com/con...ormatting-demo
kovidgoyal is offline   Reply With Quote
Advert
Old 02-01-2021, 04:14 PM   #3
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Still cant seem to get rid of the white line

I try the demo code that you provide but it doesn't work the white line at the bottom edge is still there. Here is how the code look like:

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>part0003</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="../stylesheet.css" rel="stylesheet" type="text/css"/>

<style type="text/css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>
<body>

<div style="display:none" class="title">Full screen image</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 1358 1920" preserveAspectRatio="xMaxYMid meet">
<image width="100%" height="100%" class="full-page-stretch" xlink:href="image_rsrc2GE.jpg"/>
</svg>
</body>
</html>
Attached Thumbnails
Click image for larger version

Name:	p4.PNG
Views:	109
Size:	26.2 KB
ID:	185154  
Attached Files
File Type: txt image code2.txt (856 Bytes, 104 views)
File Type: txt Stylesheet2.txt (3.6 KB, 109 views)
piyarad27 is offline   Reply With Quote
Old 02-01-2021, 08:41 PM   #4
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Did you open the image in an image program to see if the line is in the image?

I see lots of codes in your stylesheet that can cause problems.
deback is offline   Reply With Quote
Old 02-01-2021, 09:35 PM   #5
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: 36,391
Karma: 145735554
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Out of curiosity, what is the purpose of the class="full_page_stretch" class used in your code?

Quote:
<div style="display:none" class="title">Full screen image</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 1358 1920" preserveAspectRatio="xMaxYMid meet">
<image width="100%" height="100%" class="full-page-stretch" xlink:href="image_rsrc2GE.jpg"/>
</svg>
DNSB is offline   Reply With Quote
Advert
Old 02-01-2021, 10:08 PM   #6
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: 36,391
Karma: 145735554
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Also you are using a 1358x1920 image but your PDF conversion settings are for a custom 1359x1920 page.
DNSB is offline   Reply With Quote
Old 02-01-2021, 10:13 PM   #7
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: 43,973
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cant preserve aspect ratio in your svg if you want no white borders.
kovidgoyal is offline   Reply With Quote
Old 02-02-2021, 06:16 AM   #8
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by deback View Post
Did you open the image in an image program to see if the line is in the image?

I see lots of codes in your stylesheet that can cause problems.
I open the image and the line doesn't exist on the image
piyarad27 is offline   Reply With Quote
Old 02-02-2021, 06:19 AM   #9
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by DNSB View Post
Out of curiosity, what is the purpose of the class="full_page_stretch" class used in your code?
I just want to have the image fill up the page. I also try the code without class="full_page_stretch" but the white line still there under the image
piyarad27 is offline   Reply With Quote
Old 02-02-2021, 06:21 AM   #10
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by kovidgoyal View Post
You cant preserve aspect ratio in your svg if you want no white borders.
I don't understand what you mean. Are you saying that I should remove preserveAspectRatio="xMaxYMid meet" ?
piyarad27 is offline   Reply With Quote
Old 02-02-2021, 06:26 AM   #11
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by DNSB View Post
Also you are using a 1358x1920 image but your PDF conversion settings are for a custom 1359x1920 page.
I also try using 1358x1920 decalpixle in PDF conversion settings
piyarad27 is offline   Reply With Quote
Old 02-02-2021, 10:06 AM   #12
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: 43,973
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
preserveAspectRatio="none"
kovidgoyal is offline   Reply With Quote
Old 02-02-2021, 04:16 PM   #13
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by kovidgoyal View Post
preserveAspectRatio="none"
When I try the preserveAspectRatio="none" The white line is still there and the image is overflow to other page (image p5). Here is how the full code look like:

<div style="display:none" class="title">Full screen image</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 1358 1920" preserveAspectRatio="none">
<image width="100%" height="100%" xlink:href="image_rsrc2GE.jpg"/>
</svg>

P.S If I type in the custom size output as 1358x1920 instead of 1359x1920
the side of the image will also have small white border line(image p5.2) you can compare with the image p5 since the photo took at the same horizontal location
Attached Thumbnails
Click image for larger version

Name:	p5.PNG
Views:	101
Size:	25.5 KB
ID:	185170   Click image for larger version

Name:	p5.2.PNG
Views:	105
Size:	21.8 KB
ID:	185171  
piyarad27 is offline   Reply With Quote
Old 02-02-2021, 04:39 PM   #14
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: 36,391
Karma: 145735554
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
How does the image look at a more reasonable magnification, say 200%. Your images all seem to be at 6400%. Can you also show an image of the portion between two pages.
DNSB is offline   Reply With Quote
Old 02-02-2021, 05:39 PM   #15
piyarad27
Member
piyarad27 began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Oct 2020
Device: pc
Quote:
Originally Posted by DNSB View Post
How does the image look at a more reasonable magnification, say 200%. Your images all seem to be at 6400%. Can you also show an image of the portion between two pages.
Here is how it look with 200% (P6) and on the zoom of 6400%(p6.2) this is the code that I use

<style type="text/css">
@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
</style>
</head>

<body>

<div style="display:none" class="title">Full screen image</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 1358 1920" preserveAspectRatio="none">
<image width="100%" height="100%" xlink:href="image_rsrc2GE.jpg"/>
</svg>

</body>
</html>

P.S I don't want the white part because I' bit OCD or perfectionist
Attached Thumbnails
Click image for larger version

Name:	p6.PNG
Views:	107
Size:	718.5 KB
ID:	185172   Click image for larger version

Name:	p6.2.PNG
Views:	105
Size:	27.5 KB
ID:	185173  
piyarad27 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove white space under the full page image. piyarad27 Conversion 0 01-17-2021 03:41 AM
How to make pages with full bleed / full page images mypointofview Editor 5 06-21-2016 05:45 PM
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; } cybmole Conversion 15 02-12-2011 11:57 AM
Changing Margin Settings to use full width of the Screen??? JBlyth Kobo Reader 9 07-05-2010 09:54 AM
Changing Margin Settings to use full width of the Screen JBlyth Kobo Reader 0 07-02-2010 10:31 PM


All times are GMT -4. The time now is 02:52 AM.


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