Fix pdf export layout

This commit is contained in:
xmeunier 2025-02-02 22:48:00 +01:00 committed by Laetitia Getti
parent 272df57664
commit b4311f1401

View file

@ -21,26 +21,22 @@
}
{% if items|length > 10 %}
.item_name {
text-align:center;
white-space:nowrap;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
transform: rotate(-90deg);
font-size: 8pt;
height:220px;
}
.item_name div {
margin:-10px -120% ;
display:inline-block;
}
.item_name div:before{
content:'';
width:0;
padding-top:110%;
display:inline-block;
vertical-align:middle;
width:200px;
-webkit-transform: translateX(-40%);
-moz-transform: translateX(-40%);
-ms-transform: translateX(-40%);
-o-transform: translateX(-40%);
transform: translateX(-40%);
}
{% endif %}
@ -53,20 +49,19 @@
border: 1px black solid;
border-collapse: collapse;
width: 100%;
table-layout: fixed
}
th, td {
vertical-align: center;
padding: 3px 2px 2px 2px;
border: 1px black solid;
font-weight: normal;
text-align: center;
word-wrap: break-word;
}
th {
page-break-inside: avoid;
word-break: break-all;
word-wrap: break-word;
font-weight: bold;
}
@ -85,7 +80,7 @@
<thead>
<tr>
<th style="font-size: 0.5em; width: 2em">OK</th>
<th style="text-align: center">Nom</th>
<th style="text-align: center; width: 20%">Nom</th>
{% for item in items %}
<th class="item_name" style="font-weight: normal;">
<div>{{ item.name }}</div>