![]() |
#1 |
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2020
Device: none
|
Probably bug - Thin lines vanishing
I have an epub I'm converting to pdf. The Calibre converter's doing okay, really, but I decided for best results to create a customised epub and convert that. The document uses 'thin' 'medium' and 'thick' lines which are 0.25mm, 0.5mm and 1.0mm - those were round numbers chosen to make some CSS box sizes neater.
(css sample: div.large_cap { background-color: #FFFFFF; border: 0.25mm solid #222222; color: #5588FF; line-height: 12.5mm; text-align: center } i.e. a decorative box round a drop cap) But the 0.25mm lines vanish entirely from the PDF output, although they display fine in Calibre when I view the epub, and also when I view the relevant chapter html file in a web browser. So I don't think they should disappear in the pdf. When you print at 360 dpi, 0.25mm is would be about 3 dots wide so they should print OK except they're getting nobbled in transit. So I think there's a rounding error in Calibre. This is because 'one pixel' is 1/96th of an inch (ish; I know some caveats may apply), and that's 0.26mm. Seems I unknowingly chose a round number juuuust below that, so no thin lines for me! I'd be glad to log it as a bug - can anyone confirm it? Is there a config setting I've missed where I can set the minimum line thickness to some lower value? |
![]() |
![]() |
![]() |
#2 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,775
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
https://www.mobileread.com/forums/sh...d.php?t=186697
So for someone else to confirm it, please post a simple (public domain) ePub that shows the problem, and the PDF resulting from the conversion. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2020
Device: none
|
Sample files and screenshots attached .... I think. Calibre and Firefox screenshots, epub and pdf samples.
Anyone wanting to use the skeleton epub for their own purposes is welcome to. However I can't reproduce the thin lines showing correctly in calibre right now. I fiddled with display and export settings a lot, and I'm no longer certain I definitely looked at the ultra-thin lines in the Calibre viewer - thinking back, I may have been loading into Calibre and jumping straight to pdf export by that stage. However, even lines that thin could print out at 360dpi on A4, which is the intended target. There's no special reason you can't have a 0.5px line, on an ultra- hi-res display, is there? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The viewer and PDF export both happen via Chromium (Qt WebEngine to be exact). There isn't any cotrol I have over the process. If Chromium doesnt like rendering 0.5px lines, it doesnt, end of story.
|
![]() |
![]() |
![]() |
#5 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,321
Karma: 168808725
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Did you mean a 0.5pt line? A 0.5px line is half a pixel which is going to be hard to display.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,775
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
How very strange. That PDF appears to be bit maps. I had assumed it would be objects.
|
![]() |
![]() |
![]() |
#7 |
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2020
Device: none
|
@pdurrant - the first page is the autogenerated cover, which is a bitmap. Second page, which looks the same, is the proper text.
@DNSB I did mean 0.5px. Yes, a line that thin might well be too thin to display on-screen at ~96dpi. But it wouldn't be too thin to display on paper at ~360dpi. Unfortunately it never manages to get that far. @kovidgoyal That's fair then. Thank you for clarifying, and so quickly too. |
![]() |
![]() |
![]() |
#8 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,321
Karma: 168808725
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
What if you try a scaling transform which I've seen used on a few occasions? Though this is not guaranteed to work on every device. Code:
hr.thin2 { height: 1px; border-top: none; border-bottom: 1px solid black; transform: scaleY(0.50); } |
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 21
Karma: 10
Join Date: Oct 2020
Device: none
|
@dnsb
While that works for an hr, you'd have to get fancier to use the same trick on a box border and then undistort the contents. I think it would be a mistake to go to those lengths for something that's only presentational. In my case, I didn't mind what the exact values were - I can use 0.5mm, 0.75mm, 1.0mm just fine, now I know 0.25mm is too thin. It's just a little bit annoying when 0.25mm is a nice round number and it's almost 1px wide anyway darnit. (BTW, it looks like Firefox simply rounds 0.5px up to 1. 0.49px lines vanish on Firefox too.) Ironic that a definition intending to simplify printing sods up screen displays, and then the sodded-up screen stage stops the printing from working properly too. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
GLO HD screen more thin lines | sbwtxj | Kobo Reader | 3 | 08-31-2015 06:37 AM |
Troubleshooting [PROBLEM] Is my K4 a goner? (Thin gray horizontal lines on screen) | olivaresfelipe | Amazon Kindle | 7 | 11-19-2013 11:13 AM |
Touch [Bug report] Black lines on some pdfLaTex-generated pdfs | createsoftware | Kobo Reader | 2 | 06-26-2012 02:11 PM |
Touch Dark lines between lines of text | taming | Kobo Reader | 12 | 06-13-2011 07:20 PM |
Blank lines vanishing in Kindle Previewer - iPhone mode | Oxford-eBooks | Kindle Formats | 20 | 12-24-2010 04:42 PM |