We have a project where we need to print data onto a pre-made form paper (the box areas for data is already there on the paper, we just print the text onto it) using a matrix dot printer. It's an Epson FX-890II printer.
We use the standard windows.print javascript method to bring up the print dialog:
function CallPrint(strid) {
var prtContent = document.getElementById(strid);
var WinPrint = window.open('DVS_Kiszallitas.aspx', '', 'left=200,top=0,width=1440,height=1080,toolbar=0,scrollbars=0,status=0');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
document.getElementById('<%=printPanel.ClientID %>').style.display = 'none';
}
Problem is, when sending the content onto the printer straight from the browser, the printer doesn't seem to use the whole paper for printing. What text appears to be right on the edge of the paper according to the browser's print preview window, will be several centimeters in on the actual paper. So many of the data that would be on the right edge of the paper either don't appear or get pushed in by several centimeters.
Another issue is that letter spacing for some reason is much smaller on the printer output, so text that appears normal in the browser gets squished together by the printer, so we have to use letter-spacing in the html for the printer output to be readable. Changing the CPI on the printer itself did nothing, 10 CPI and 20 CPI look the same.
Worth mentioning that if we use the browser's printer dialog to save the output to a pdf first, then send that pdf onto the printer, then it's fine. The text appears normal and the printer uses the whole page for printing. The issue is only if we're printing straight from the browser. Any idea why this might be?
PS.: printer drivers are up to date, and obviously we tried playing around with margin and size settings, both in browser and on the printer itself.