Link to home
Start Free TrialLog in
Avatar of bhrobinson
bhrobinson

asked on

How to print to multiple devices

I know this sounds screwed up, but I am writing a website that will print to 3 printers.

Process flow is such:

user enters data.
If user inputs a certain field, system prints to (printer 1). In this case, a label to go on an item.
system will always then print to (printer 2). This will always be a label to go on a carton
after x many times, the system will then print to (printer 3). Thsi will be a label to go on a case.

I know I can get the machine to pull up the selection with a window.print() but I am needing it to be automated. I do not mind hard coding the printer names in if anyone can give me an idea of how to do this.
Avatar of gnudiff
gnudiff


There is only very limited easy printing available from browser. window.print() is about it;

so you have 2 choices:

1) if the webserver is in the same location as user, you may want to print from server, rather than from user.

Ie. the user clicks on print, the web server prepares the printout, but instead of sending to browser, sends to printer(s) directly.
The problem is usually that you can't print an HTML page to a printer directly -- it will come out as text file with all the tags, so some print filtering will be needed.
I don't know what are you using: ASP/PHP or whatever.
About PHP see: http://www.php.net/manual/en/ref.printer.php

2) find some Java applet or ActiveX control to do the job.
I am afraid I do not have it exactly, but I remember you can insert some HTML <embed> or <object> code in page, which will try to run Windows built-in ActiveX(?) for printing, and have better printing control there.
It will only run on Windows/Internet Explorer combo though; and I think it requires the user to set some browser security settings lower.

Alternative is to find a Java applet for that - that could be a bit more portable, if that's a concern.
Avatar of bhrobinson

ASKER

Excellent info.

As for the server, unfortunately that is not an option. I am collecting the info into a db at a seperate location. Otherwise I would have spit it out in Access and been done with it.

If you can locate the Jav or ActiveX, it is greatly appreciated. That is where I am stuck!


Thanks again.
SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada 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
Awesome answer, but I am looking for a one time cost solution. Not a fan or the revolving billing....

ASKER CERTIFIED SOLUTION
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