Link to home
Start Free TrialLog in
Avatar of justaphase
justaphaseFlag for Portugal

asked on

Direct to chosen printer

Hello everybody,

I have a big dificulty with printing issue. I allready search the net but the answers i saw can't seem to get it right.. i'm posting in general webdev because i dont know wich language code will resolve my problem..
This is for an intranet made in php(html and javascript of course) and works with MsSql. Its not for outside www. I'm telling this because what i want will brake the web security for sure, because certenatly i have to use ActiveX and maibe vbscript.. maibe.. i don't know...
I need to print directly to the printer an html page without the prompt window, and i need to select to wich printer i send the web page from the "html" code(or something else).
I know that its impossible with javascript, but i know that with vbscript we can interact more with the browser settings and other stuff.
Is it possible? It can be vbscript, java, php, whatever, i just need to make it work.
The language i use to code is php, but i don't think that the php printer functions can resolve this...

thx in advanced
Avatar of aplimedia
aplimedia
Flag of Spain image

Hi,

You will not be able to decide on behalf of the local user which printer you want them to use. the best you can use is the window.print() javascript function.

regards

Aplimedia
Avatar of justaphase

ASKER

I know there's a way Aplimedia... not with normal coding like html or javascript.
An example i have is that u can´t remove the headers and footers from a print page automaticaly with html coding or javascript, but u can with vbscript... i just don´t know how to chose a printer and print directly with vbscript or pure java or some other language that works as an ActiveX object..
ASKER CERTIFIED SOLUTION
Avatar of bubbledragon
bubbledragon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i've been studing the templateprinter from microsoft from the link you gave but, as allways microsoft add to do some of their own mustakes... http://support.microsoft.com/default.aspx?scid=kb;en-us;308649

i'm really getting stuck... and i really have to do this :(
Avatar of noamattd
noamattd

justaphase: There is no way to do this.  It would be a huge security hazard if you could use scripts to print automatically (think of a site that tried to print out 10000 pages of gibberish or porn).  The best you can do is have it automatically take them to the printer-selection/print setup dialog.
i know that it is a big security hazard noamattd, i post this question here just to know if there is an alternative with some web language that would ask me to install a certification or an applet, or an ActiveX and the client would be responsible for that script action... should never be something to break trought security, its not my goal... i'm not an hacker if that's what u thinkin :D
Guess this question shouldn't be here. I allready put this question in the apropriate topic, this should closed or deleted, i forgot how to do this...
SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial