Originariamente inviato da KingOfTheKill
Praticamente devi fare la distinzione tra utenti "normali" (internet) e utenti "intranet" (tipo rete aziendale).
Se l'utente è normale, allora purtroppo non puoi farci niente: non hai il controllo sui programmi e sulle impostazioni che il soggetto ha sul suo pc.
Se invece gli utenti del tuo sito sono collegati in rete, allora c'è la possibilità di creare un qualche programma (ad esempio in C o C++) che venga lanciato ad un comando specifico e che attivi direttamente la stampante predefinita.
Solo non chiedermi come si faccia
Il tutto gira in locale quindi non sarebbe un problema...
forse ho trovato con questo, sembra funzionare
codice:
<OBJECT Classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB width=0></OBJECT>
<SCRIPT LANGUAGE="JavaScript">
DA = (document.all) ? 1 : 0
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
sub print()
OLECMDID_PRINT = 6
OLECMDEXECOPT_DONTPROMPTUSER = 2
OLECMDEXECOPT_PROMPTUSER = 1
'on error resume next
'IE4 object has different command structure
if DA then
call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1)
else
call WB.IOleCommandTarget.Exec(OLECMDID_PRINT ,OLECMDEXECOPT_DONTPROMPTUSER,"","")
end if
end sub
'This will be interpreted during loading.
'It will write out the correct webbrowser object depending
'on the browser version. To be sure it works, make sure you
'include this script block in between the body tags.
if DA then
'this must be IE4 or greater
wbvers="8856F961-340A-11D0-A96B-00C04FD705A2"
else
'this must be IE3.x
wbvers="EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B"
end if
document.write ""
</SCRIPT>
e poi basta chiamare window.print()
non so bene cosa faccia ma funziona