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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-20-2022, 06:11 AM   #1
AKmatiAK
Junior Member
AKmatiAK began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2022
Device: none
Post Move headers from bottom to new page when converting to PDF

Hi. When converting EPUB to PDF there are some headers at the bottom of page, which are uncomfortable for reading printed book. My suggestion is to add option to move these headers to next page, or just make it default behavior.
AKmatiAK is offline   Reply With Quote
Old 03-20-2022, 09:41 AM   #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: 45,139
Karma: 27110892
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Add the following to the extra css setting in the look & feel section of the conversion dialog

h1, h2, h3, h4, h5, h6 { page-break-before: always; }
kovidgoyal is offline   Reply With Quote
Old 03-20-2022, 01:26 PM   #3
AKmatiAK
Junior Member
AKmatiAK began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2022
Device: none
This allows only one header per page and nearly doubles number of pages :/

break-after: avoid-page; and page-break-after: avoid; seem to not work unfortunately
AKmatiAK is offline   Reply With Quote
Old 03-20-2022, 01:48 PM   #4
AKmatiAK
Junior Member
AKmatiAK began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2022
Device: none
wkhtml lacks support of this attributes. I found workaround here: stackoverflow

paste this code instead and it will work for all headers:

Quote:
h1, h2, h3, h4, h5, h6 {
page-break-inside: avoid;
}
h1::after, h2::after, h3::after, h4::after, h5::after, h6::after {
content: "";
display: block;
height: 100px;
margin-bottom: -100px;
}
AKmatiAK is offline   Reply With Quote
Reply

Tags
conversion from epub, headers, pdf

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epub to PDF can't remove page breaks between headers Vykan12 Calibre 11 07-25-2012 03:01 AM
Converting epub to PDF - can't get top/bottom margins to work Cayo Conversion 17 04-12-2012 08:19 PM
top and bottom margins when converting to pdf jhsrennie Conversion 3 04-06-2012 02:26 AM
Can I remove PDF author info and/or page headers? cloudyvisions Calibre 0 03-05-2010 11:48 PM
Remove PDF page headers ? JohnB Calibre 9 03-27-2009 01:19 PM


All times are GMT -4. The time now is 12:51 AM.


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