mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Labels now do not break page if the content gets too long.
This fixes issue #65.
This commit is contained in:
parent
86c580f835
commit
25475b5571
2 changed files with 20 additions and 1 deletions
|
@ -13,7 +13,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% for element in elements %}
|
{% for element in elements %}
|
||||||
<div style="page-break-inside: avoid; page-break-before: avoid; {% if not loop.last %}page-break-after: always;{% endif %}">
|
<div class="page">
|
||||||
{% if options.barcodeType == 'none' %}
|
{% if options.barcodeType == 'none' %}
|
||||||
{% include "LabelSystem/labels/label_page_none.html.twig" %}
|
{% include "LabelSystem/labels/label_page_none.html.twig" %}
|
||||||
{% elseif options.barcodeType in ['qr', 'datamatrix'] %}
|
{% elseif options.barcodeType in ['qr', 'datamatrix'] %}
|
||||||
|
|
|
@ -2,6 +2,25 @@
|
||||||
margin: 12px 6px;
|
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 {
|
body {
|
||||||
font-family: "DejaVu Sans Mono";
|
font-family: "DejaVu Sans Mono";
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue