Jump to content

IE9 and Generic Text Only Printer


Recommended Posts

Guest cjveloso
Posted

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('')

pWin.document.write('')

pWin.document.write('Visualização da Impressão')

pWin.document.write('')

pWin.document.write('

') 
pWin.document.write(s) 
pWin.document.write('

')

pWin.document.write('')

pWin.history.go()

//pWin.print()

//pWin.document.close()

//pWin.close()

}

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...