Fixed problem of missing page breaks when generating multiple labels

This was caused by some behavior change introduced in dompdf 3.1.1
This fixes issue #1070
This commit is contained in:
Jan Böhmer 2025-10-17 00:20:40 +02:00
parent e1418dfdc1
commit 4d98605e93
4 changed files with 473 additions and 441 deletions

View file

@ -16,15 +16,18 @@
</head>
<body>
{% for element in elements %}
{# The page div ensures the page breaks, while the page-inner elements restrict the content to the page size. Sine dompdf 3.1.1 we cannot apply the position: absolute; to the page element directly. #}
<div class="page">
{% if options.barcodeType.none %}
{% include "label_system/labels/label_page_none.html.twig" %}
{% elseif options.barcodeType.is2D() %}
{% include "label_system/labels/label_page_qr.html.twig" %}
{% elseif options.barcodeType.is1D() %}
{% include "label_system/labels/label_page_1d.html.twig" %}
{% endif %}
<div class="page-inner">
{% if options.barcodeType.none %}
{% include "label_system/labels/label_page_none.html.twig" %}
{% elseif options.barcodeType.is2D() %}
{% include "label_system/labels/label_page_qr.html.twig" %}
{% elseif options.barcodeType.is1D() %}
{% include "label_system/labels/label_page_1d.html.twig" %}
{% endif %}
</div>
</div>
{% endfor %}
</body>
</html>
</html>