PDF Export - remove page breaks between days #1292
Replies: 3 comments
|
Love this app and everything about it for me as a techy person. This would make it great for me to hand over to my parents who like hard copies :) |
Trip Plan PDF — printer-friendly formatting (trek-base)Patches TREK v3.1.3 trip PDF output in Baseline: stock Files changed
Not changed: 1. Day loop — remove forced page breakWhere: - sorted.map((day, di) => {
+ sorted.map((day) => {
...
- <div class="day-section${di > 0 ? ' page-break' : ''}">
+ <div class="day-section">CSS removed: .page-break { page-break-before: always; }CSS added: .day-section + .day-section { margin-top: 16px; }2. Cover — compact white header (ink-friendly)Where: Removed (stock trek-base)
Added
Cover HTML shape: <div class="cover">
<div class="cover-accent"></div>
<div class="cover-brand">…logo-dark.svg…</div>
<div class="cover-body">
<!-- cover-circle only if trip has cover_image -->
<div class="cover-main">…label, title, dates, stats…</div>
</div>
</div>3. Widow/orphan — keep blocks together when printingWhere: day + accommodation CSS and Stock trek-base had no break rules on day header/body or accommodation cards (cards split across pages — e.g. accommodation title on page N, booking details on N+1). Added on screen + print.day-header {
break-after: avoid;
page-break-after: avoid;
}
.day-body {
break-before: avoid;
page-break-before: avoid;
}
.day-accommodations-overview,
.day-accommodation {
break-inside: avoid;
page-break-inside: avoid;
}( Added in
|
|
Coming in 4.0.0! |
Uh oh!
There was an error while loading. Please reload this page.
PDF feature is great, but it looks much better rendered in the app than when printed as a PDF. When printed, each day has a page break, even if there is only 1 or no items on that day. I'd much prefer the export to look like the pdf view in the app which gives each day a dynamic height depending on the content. If this can be an option, that can serve both users who prefer the page breaks and those that don't
Thanks!
All reactions