IE9 and Generic Text Only Printer

C

cjveloso

Guest
Cannot print with IE9 and Generic Text only Printer. Print blank page, sometimes do not print..
I have kyocera printer and It works, but Generic Text do not.
IE8 works !

OS: Windows Vista business SP2 32
App: JSF2.0 + Richfaces 3.33

follow my javascript print function
function printCupom(s) {
var winTop = screen.availHeight/2 - 190; // Serve para alinhar a janela no meio do monitor
var winLeft = screen.availWidth/2 - 260;
var windowFeatures = "menubar=no,toolbar=yes,location=no,scrollbars=yes,status=yes,width=520,height=380,top=0,left=0,";
windowFeatures = windowFeatures + "left=" + winLeft + ",";
windowFeatures = windowFeatures + "top=" + winTop;
//
var regExp=/\n/gi;
s = s.replace(regExp,'
');
pWin = window.open('','pWin',windowFeatures);
pWin.document.open();
pWin.document.write('<html>');
pWin.document.write('<head>');
pWin.document.write('<title>Visualização da Impressão</title>');
pWin.document.write('</head><body style="{font-family:courier,fixed,monospace;font-size:10pt;margin: 0 0 0 0px;}">');
pWin.document.write('<pre>');
pWin.document.write(s);
pWin.document.write('</pre>');
pWin.document.write('</body></html>');
pWin.history.go();
//pWin.print();
//pWin.document.close();
//pWin.close();
}

Continue reading...
 
Back
Top