feat: better PDF

This commit is contained in:
2025-08-24 00:24:40 +02:00
parent 0267e6e578
commit 5b664234e9
18 changed files with 540 additions and 228 deletions

View File

@@ -1,8 +1,28 @@
@page {
size: A4;
padding: 2cm;
}
@page:first {
padding: 0;
}
@media print {
.page,
.page-break {
break-after: page;
}
}
.first-page {
margin-left: 2cm;
margin-right: 2cm;
}
body {
font-family: sans-serif;
margin: 40px;
font-size: 12pt;
color: #333;
}
section {
margin-bottom: 3em;
}
@@ -10,6 +30,7 @@ p {
margin-top: 0.25em;
margin-bottom: 0.5em;
}
header {
display: flex;
justify-content: space-between;
@@ -23,10 +44,10 @@ h1 {
margin: 0;
font-size: 2em;
}
.company,
.client {
margin-bottom: 20px;
h2 {
margin-top: 0.5em;
}
table {
width: 100%;
border-collapse: collapse;
@@ -39,96 +60,27 @@ td {
}
th,
td {
padding: 10px;
padding: 0.25em 0.5em;
text-align: left;
}
th {
background-color: #f2f2f2;
}
tfoot td {
font-weight: bold;
}
h2 {
margin-top: 40px;
}
article {
margin-bottom: 20px;
}
footer {
margin-top: 40px;
font-size: 0.9em;
text-align: center;
color: #666;
}
.totals {
float: right;
width: 300px;
margin-top: -15px;
}
.totals table {
border: none;
margin: 0;
}
.totals td {
border: none;
padding: 5px 10px;
text-align: right;
}
@media print {
.page,
.page-break {
break-after: page;
}
}
.qr-section {
position: absolute;
bottom: 0;
display: grid;
grid-template-columns: 250px 1fr;
grid-template-rows: 1fr;
gap: 1em;
width: 100%;
/* border-top: 2px solid #000; */
/* padding-top: 1rem; */
h4 {
margin-bottom: 0.1em;
}
.qr-code {
display: flex;
flex-direction: column;
justify-content: space-between;
.qr-section-img {
position: relative;
width: 100%;
img {
width: 100%;
}
svg {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
width: 40px;
}
}
.qr-section-info {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
justify-items: center;
}
}
.payment-details {
font-size: 0.9rem;
line-height: 1.4;
.issue-title {
display: flex;
justify-content: space-between;
align-items: end;
margin-top: 2em;
margin-bottom: 0.5em;
h3,
p {
margin: 0;
}
}