mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-20 18:09:30 +00:00
This was caused by some behavior change introduced in dompdf 3.1.1 This fixes issue #1070
33 lines
1.4 KiB
Twig
33 lines
1.4 KiB
Twig
{% import "vars.macro.twig" as vars %}
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{ meta_title }}</title>
|
|
<meta name="author" content="{{ vars.partdb_title() }}">
|
|
<meta name="description" content="Label for {{ meta_title }}">
|
|
<meta name="keywords" content="Part-DB, Label, Barcode">
|
|
<style>
|
|
{% include("label_system/labels/label_style.css.twig") %}
|
|
{# We must not escape it here, as the string might contain ", which would be escaped. As user can control the whole HTML, XSS is not really a problem here. #}
|
|
{{ options.additionalCss | raw }}
|
|
</style>
|
|
</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">
|
|
<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>
|