I use custom theme for invoice and it worked fine for me until version 25.8.26.2717 however in the latest version some elements in the page are breaking unexpectedly and the page numbers are not visible, I tried using different methods but still could’nt fix it. Also I’m running macOS Sequoia in my desktop. The CSS I use for the print is as below:
```
@media print{
@page{
size:A4 portrait; margin:0.5in;
@bottom-center{
content:"Page " counter(page) " | " counter(pages);
font-size:.8em;
}
}
*{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;}
html,body{background:#fff !important;}
body{margin:0 !important;padding-bottom:0 !important;font-size:10pt !important;line-height:1.3 !important;}
.invoice-container{box-shadow:none !important;border-radius:12px !important;max-width:none !important;width:100% !important;margin:0 !important;padding:0 !important;break-inside:avoid-page;}
.it-header{border-radius:12px 12px 0 0 !important;padding:16px 20px !important;margin:0 0 12px !important;}
.it-title{font-size:16pt !important;line-height:1.2 !important;color:#fff !important;text-shadow:none !important;}
.it-doc{padding:12px 16px !important;}
/* Reinforce sticky header/footer groups for tables */
.table thead{display:table-header-group !important;}
.table tfoot{display:table-footer-group !important;}
.table tr{page-break-inside:avoid;break-inside:avoid;}
.table td,.table th{page-break-inside:avoid;break-inside:avoid;}
.table tbody tr{orphans:2 !important;widows:2 !important;}
/* Ensure header colors + compact cell sizing */
.it-th,.it-td{padding:4px 8px !important;font-size:7pt !important;}
/* Critical sections must not split */
.invoice-bottom-section,
.totals,
#status,
.invoice-footer,
#footers{break-inside:avoid-page !important;page-break-inside:avoid !important;}
}
Also I tried reverting to the older version but I’ unable to do so.

