fungtong Posted June 2, 2007 Share Posted June 2, 2007 Hi All, I am writing a web-based system with php. There are some labels and reports printing. Each requires different printers which are connected to the same client computer. How could I set so that, when I click a "Print Doc A" button, document A would print to printer A, and click "Print Doc B" button, document B would print to printer B. The printers are different for all users. info: It is a web-base system used within a lan. So each user use the system with a fixed computer. Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/ Share on other sites More sharing options...
gabeg Posted June 2, 2007 Share Posted June 2, 2007 I don't think PHP is the right solution for this type of project because I'm not aware of anyway to handle what you're attempting to do because PHP is processed on the server, and simply rendered on the browser Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-266683 Share on other sites More sharing options...
dj-kenpo Posted June 2, 2007 Share Posted June 2, 2007 it's pretty easy acctually, well, not eeasy, but possible. php has serial out functions the way I would do it would be to send a number from 1-4 via the serial port to a small microproccessor controller switch box. for building the switchbox if you've never dabbled in microcontrollers I'd start with the "basicstamp" or "pic-axe" both use "basic" for the language, it would need all of about 4 lines of code and then simple relays. there's loads of tutorials out there for hobbyists on the subject. how are the 4 printers hooke dup to the host pc? usb? Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-266718 Share on other sites More sharing options...
fungtong Posted June 2, 2007 Author Share Posted June 2, 2007 there would be two networked printers Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-266995 Share on other sites More sharing options...
dj-kenpo Posted June 2, 2007 Share Posted June 2, 2007 networked how, you're really not helping yourself here. they have ethernet ports? or they are on a host pc and thus networked? Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-267090 Share on other sites More sharing options...
Barand Posted June 2, 2007 Share Posted June 2, 2007 I'd produce the labels or reports as PDF documents then the user can send them to their printers as required. Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-267145 Share on other sites More sharing options...
fungtong Posted June 3, 2007 Author Share Posted June 3, 2007 All are with in the same lan. A domain server holds two networked printer. A webserver holds the web-app And there are number of client PCs. Quote Link to comment https://forums.phpfreaks.com/topic/53925-select-printer/#findComment-267333 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.