feat: replace html2canvas with native high-quality browser printing

This commit is contained in:
2026-06-23 13:15:38 +00:00
parent a4a1c82acc
commit 189bf399dc
3 changed files with 43 additions and 26 deletions
+33 -16
View File
@@ -30,21 +30,38 @@
animation: fade-in 0.5s ease-out forwards;
}
/* Force black text for PDF generation */
.pdf-export .text-slate-400,
.pdf-export .text-slate-500,
.pdf-export .text-slate-600,
.pdf-export .text-slate-700,
.pdf-export .text-slate-800,
.pdf-export .text-slate-900,
.pdf-export .text-slate-300,
.pdf-export .text-slate-200 {
color: #000000 !important;
}
/* High-quality native browser printing */
@media print {
* {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
@page {
margin: 0;
size: A4;
}
/* Also ensure borders are clearly visible */
.pdf-export .border-slate-100,
.pdf-export .border-slate-200,
.pdf-export .border-slate-50 {
border-color: #cbd5e1 !important; /* slate-300 */
body {
background: white !important;
}
/* Force black text for PDF generation */
.report-page .text-slate-400,
.report-page .text-slate-500,
.report-page .text-slate-600,
.report-page .text-slate-700,
.report-page .text-slate-800,
.report-page .text-slate-900,
.report-page .text-slate-300,
.report-page .text-slate-200 {
color: #000000 !important;
}
/* Also ensure borders are clearly visible */
.report-page .border-slate-100,
.report-page .border-slate-200,
.report-page .border-slate-50 {
border-color: #cbd5e1 !important; /* slate-300 */
}
}