Hi @zorangelev,
Thank you for your message!
Yes, it is definitely possible to optimize the template for printing on an 80mm thermal printer.
You can use the wcdn_head hook to apply custom print styles. Please try adding the following code to your site:
add_action( 'wcdn_head', 'print_paper_resize', 10 );
function print_paper_resize() {
?>
<style>
@media print {
@page {
size: 80mm auto;
margin: 0;
}
html, body {
width: 100%;
max-width: 80mm;
margin: 0 auto !important;
font-size: 8.5pt;
font-weight: 550;
}
table, tr, td {
page-break-inside: avoid;
}
.shipping-address { width: 80% !important; }
.billing-address { width: 70% !important; margin-bottom: 1em !important; }
h2, h3 { margin-bottom: 0 !important; }
th { padding-bottom: 0 !important; padding-left: 0.5em !important; }
td { padding: 0.35em 0.35em 0 !important; }
.order-addresses { margin-bottom: 1em !important; }
.order-info li strong {
font-weight: 600 !important;
display: inline !important;
padding-right: 1.4em !important;
}
.order-info,
.order-branding {
margin-bottom: 0 !important;
}
.product-quantity,
.total-quantity {
padding-left: 1.8em !important;
}
.includes_tax {
white-space: nowrap !important;
}
.content {
padding-bottom: 0;
}
}
</style>
<?php
}
Let us know how it works on your end, and we’ll be happy to assist further if needed.