mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-14 23:19:30 +00:00
Merge branch 'master' into label_printing_on_A4
This commit is contained in:
commit
248bc82eb5
521 changed files with 59933 additions and 17536 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue