bindery
bindery copied to clipboard
print spreads with first side left
i tried messing with
-
isTwoUp -
isDoubleSided -
pages.unshift(spacerPage) -
padPages
but no luck ...
actual layout
1
2 3
4
expected layout
1 2
3 4
this is useful for printing pamphlets = single page flyers
workaround: add empty page before first page, then print sheets 2 and 3
const binderyOptions = {
content: '#content',
rules: [
Bindery.PageBreak({ selector: '.pagebreak', position: 'after' }),
Bindery.RunningHeader({
render: (page) => {
if (page.isEmpty) return "";
const pageNumber = page.number - 1; // workaround
const headerTitle = "";
if (page.isLeft) return `<div class="running-header"><div class="page-number">${ pageNumber }</div>${headerTitle}</div>`;
if (page.isRight) return `<div class="running-header">${headerTitle}<span class="page-number">${ pageNumber }</span></div>`;
},
}),
],
printSetup: {
// https://bindery.info/docs/#printsetup
layout: Bindery.Layout.SPREADS, // PAGES SPREADS BOOKLET
paper: Bindery.Paper.A4_LANDSCAPE, // A5_PORTRAIT A4_LANDSCAPE
marks: Bindery.Marks.NONE, // NONE CROP BLEED BOTH
bleed: '-12pt', // workaround: bleed is biased by +12pt -> padding-top: calc(var(--bindery-bleed) + 12pt);
},
pageSetup: {
size: { width: '148mm', height: '209mm' }, // A5. height -1mm to avoid pagebreak https://github.com/evnbr/bindery/issues/109
margin: { top: '10mm', inner: '20mm', outer: '10mm', bottom: '10mm' },
},
};
<div id="content">
<div class="pagebreak"></div>
<p>
hello world ...
</p>