I am using react-to-print with Nextjs.
Problem
This is the problem.
I don't want it to break and want it to continue and treat it as 1 page.
I have POS-80C thermal printer, and it cuts on every page.
It should only cut at the last when everything is printed.
Things I tried
- I tried to use page-break inside @media print .
@media print {
@page {
size: 80mm auto;
margin: 7.56px;
}
.dontsplit {
page-break-inside: avoid;
// page-break-before: avoid;
// page-break-after: avoid;
page-break-after: always;
}
.table-to-print * {
font-size: 0.9rem;
margin: 0;
padding: 0;
}
.no-print {
display: none;
}
}
- I tried scaling it down to fit on a single page, but the text becomes very tiny and unreadable.
resize-page-contents-to-fit-on-one-print-page
Questions
- Is it fixable with CSS only?
- Is it fixable with javascript before .print() is initialized?
- Is it the default behaviour of browsers and can't be fixed?

@page size autohas been translated into 297mm (see screenshot). Can you use an explicit length like 1000cm?autoto100 cm or 1000cmcauses the text to shrink/scale down. Precisely, the margin becomes too much, and when I make the margin of left and right to2mmsame thing as the picture happens.pdfasA4(there is no option for 80mm). When I open thepdf, and print from the printer, the text are overflowing. Only theS.N.andorder(left side of the bill) is seen on the paper.