My printer default size is A4,and I need to print payslip in size 8.5inx5.5in using the old dot matrix printer.
I tried to set every payslip DIV
in a fixed height,
width: 175.6mm;
height:123.7mm;
margin-left:auto;
margin-right:auto;
Although it fit the payslip size perfectly,but after printed,the paper will keep rolling until end of it because payslip paper are all joined unlike A4. And I do not wish to make any changes to printer paper size,so I set:
@media print
{
@page
{
size: 8.5in 5.5in;
size: portrait;
}
}
but the print preview of Google Chrome still showing this:
Actually is it possible to do so?Or is there any way to force printer stop printing after payslip printed to prevent it from keep rolling the paper?(which I think should be not possible)
P.S. I am using Google Chrome only.
**Updated:
I noticed the paper size will change after I choose to "Save as PDF",if I choose back my default printer,the paper size is incorrect again.
maybe this work.
@media print
{
@page
{
size: 8.5in 5.5in;
size: landscape;
}
}
or
@media print
{
@page
{
size: 5.5in 8.5in ;
size: landscape;
}
}