Work around problems with our printer setup using margins
This commit is contained in:
parent
3bdba5f495
commit
f74195438c
|
@ -10,7 +10,41 @@
|
|||
width: 38mm,
|
||||
height: 90mm,
|
||||
flipped: false,
|
||||
margin: (x: 3mm, top: 3mm, bottom: 3mm+9pt),
|
||||
// Because, for this document, our printer setup - a Brother P-touch QL-500
|
||||
// label printer driven by a CUPS with the printer-driver-ptouch - and
|
||||
// DK-11208 Large Address Labels (38x90mm), either the printer driver or the
|
||||
// printer itself doesn't properly print on the labels, we need to deploy some
|
||||
// workarounds using margins.
|
||||
// Link to the printer-driver-ptouch:
|
||||
// https://github.com/philpem/printer-driver-ptouch
|
||||
//
|
||||
// For the horizontal margins, we use a 4mm margin on the left and a 0mm
|
||||
// margin on the right.
|
||||
// Do this because by default the print itself is offset to the left sadly. It
|
||||
// seems like the printer is printing from the very edge, where the label
|
||||
// roll, but not the label itself, is. On the label roll on the left there are
|
||||
// 2mm of material until the label itself starts, so we need to offset by 2mm
|
||||
// on the left for the print to be on the label itself. However this offset
|
||||
// also results in a forced margin of 2mm on the right, so to have an even
|
||||
// margin on the resulting label, add another 2mm of margin on the left,
|
||||
// resulting in 4mm of margin on the left in total. Also just don't have any
|
||||
// margin on the right, since there's a forced margin already anyway.
|
||||
//
|
||||
// For the vertical margins, we use a 0mm top margin and a 9mm + 9pt bottom
|
||||
// margin.
|
||||
// Do this because the printer doesn't print from the very top of the label
|
||||
// sadly, so since we then have a forced margin there anyway (one of 6mm), we
|
||||
// don't need to add any top margin.
|
||||
// On the bottom, we already need a margin of 9pt for the image to be fully on
|
||||
// the page. However, because the printer doesn't start at the very top, the
|
||||
// printing ends after the label already ended. To combat this, add a margin
|
||||
// of 7mm for the logo to still be on the page and add another 2mm for the
|
||||
// margin to be same as the margin at the sides (resulting in 9mm).
|
||||
//
|
||||
// These workarounds were developed for this document, our Brother P-touch
|
||||
// QL-500 label printer in combination with DK-11208 Large Address Labels
|
||||
// (38x90mm).
|
||||
margin: (left: 4mm, right: 0mm, top: 0mm, bottom: 9mm + 9pt),
|
||||
footer-descent: 0%,
|
||||
footer: [
|
||||
#set text(size: 8pt)
|
||||
|
|
Loading…
Reference in a new issue