diff --git a/templates/LabelSystem/labels/base_label.html.twig b/templates/LabelSystem/labels/base_label.html.twig index 4c41a048..d3c1b999 100644 --- a/templates/LabelSystem/labels/base_label.html.twig +++ b/templates/LabelSystem/labels/base_label.html.twig @@ -13,7 +13,7 @@ {% for element in elements %} -
+
{% if options.barcodeType == 'none' %} {% include "LabelSystem/labels/label_page_none.html.twig" %} {% elseif options.barcodeType in ['qr', 'datamatrix'] %} diff --git a/templates/LabelSystem/labels/label_style.css.twig b/templates/LabelSystem/labels/label_style.css.twig index ff407982..c2434a77 100644 --- a/templates/LabelSystem/labels/label_style.css.twig +++ b/templates/LabelSystem/labels/label_style.css.twig @@ -2,6 +2,25 @@ margin: 12px 6px; } +.page { + page-break-inside: avoid; + page-break-before: avoid; + page-break-after: always; + + overflow: hidden; + /* Absolute position prevents automatic page breaks */ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +/* Last page should not break */ +.page:last-of-type { + page-break-after: avoid; +} + body { font-family: "DejaVu Sans Mono"; font-size: 12px;