Merge branch 'master' into label_printing_on_A4

This commit is contained in:
d-buchmann 2025-11-07 13:46:40 +01:00 committed by GitHub
commit 248bc82eb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
521 changed files with 59933 additions and 17536 deletions

View file

@ -10,6 +10,9 @@
{% block card_content %}
{{ form_start(form) }}
{# Default submit to use when pressing enter. #}
<input type="submit" name="label_dialog[update]" class="d-none">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-bs-toggle="tab" id="common-tab" role="tab" aria-controls="common" aria-selected="true" href="#common"
@ -112,6 +115,10 @@
</div>
{% endif %}
{% if form.update_profile is defined %}
{{ form_row(form.update_profile) }}
{% endif %}
<div class="form-group row">
<div class="offset-sm-3 col-sm-9">
<div class="input-group">
@ -145,4 +152,4 @@
</object>
</div>
{% endif %}
{% endblock %}
{% endblock %}

View file

@ -1,9 +1,11 @@
{% import "vars.macro.twig" as vars %}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{ meta_title }}</title>
<meta name="author" content="{{ partdb_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>
@ -14,7 +16,10 @@
</head>
<body>
{% set start_page %}
<div class="page" style="break-after: always;"><table col="{{ options.xcount }}" row="{{ options.ycount }}"><tr>
{# 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">
<table col="{{ options.xcount }}" row="{{ options.ycount }}"><tr>
{% endset %}
{% set end_page %}
@ -60,4 +65,4 @@
{% endfor %}
{{ end_page }}
</body>
</html>
</html>

View file

@ -3,17 +3,31 @@
}
.page {
/** We cannot apply the position: absolute trick here, because then dompdf will not respect the page break anymore **/
page-break-inside: avoid;
page-break-before: avoid;
page-break-after: always;
overflow: hidden;
width: 100%;
height: 100%;
}
.page-inner {
/* Absolute position prevents automatic page breaks */
/*position: absolute;*/
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
page-break-inside: avoid;
page-break-before: avoid;
page-break-after: avoid;
}
/* Last page should not break */