01-03-2022, 09:02 AM | #1 |
Addict
Posts: 283
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
epub to pdf converion and @media print
I have not been successful in putting a stylesheet command in the epub editor which (1) has no effect in the EPUB viewer but (2) works in the PDF conversion. I'm compressing line height as needed to get rid of single lines left over at the end of chapters in PDFs. Normal line height is 1.3 but @media print { .l1 {line-height:1 ; }} is ignored during conversion to PDF. Is there a trick to this? Maybe the instruction is wrong? Best regards, Pop
|
01-03-2022, 09:08 AM | #2 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
what instruction? I dont recall the pdf conversion having any @media print instructions??
|
01-03-2022, 09:28 AM | #3 |
Addict
Posts: 283
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
Please excuse my confusion. I put the style command
<style> @media print {.l1{ line-height: 1 ; } } </style> along with <body class="l1"> in an xhtml segment which is a free-standing chapter. At print, I was hoping the line height would be reduced from 1.3 to 1 so that there would not be a straggler line left over. If I remove the word 'print' PDF conversion AND epub viewer reduces line height to 1. I was hoping for an instruction only honored during print. Best regards, Pop |
01-03-2022, 09:41 PM | #4 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's no way to control that from within the book. You can specify your css rules during conversion in the Look & feel->styles section of the conversion dialog.
|
01-05-2022, 05:29 AM | #5 |
Addict
Posts: 283
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
|
thank you for that. It works wonderfully well. I do not even need @media. I lost sight of forest for the trees. Best regards, Pop
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot convert or Print EPUB to PDF | NightShot | Conversion | 2 | 09-05-2020 11:39 AM |
footnote, endnotes, print, epub, pdf | apricoto | Conversion | 7 | 08-12-2020 10:25 PM |
Images missing after converion from docx to epub/mobi | ahoy | Conversion | 1 | 11-08-2013 11:40 AM |
Converting epub into pdf with print pagination | luciano | Workshop | 6 | 09-05-2012 05:15 PM |
Print and TV media coverage | JCSullivan | Kobo Reader | 11 | 05-04-2010 09:41 PM |