How To Print Directly to Printer

Reply

Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

How To Print Directly to Printer

 
0
  #1
Dec 21st, 2004
Hi all,

How can we gain control of printer using php? I mean gain control as in, choosing the right printer from our php page and send the document directly to printer. I want to bypass the print dialog box that will appear when we print from web browser.

By the way, I've checked the PHP.net to check on printer functions (http://my.php.net/manual/en/ref.printer.php), it contains outdated links. I am really not sure how to get about using the function. I've already tried to download the php_printer.dll file from some website and unquote the extension in the php.ini file but can't get the printer_open() function to work, Perhaps someone can point to me where to download the right file or the right steps to do in order to use it .

I know we can't do this with Javascript, or can we?

Really appreciate all the info i can get. Thanks
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,036
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 128
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: How To Print Directly to Printer

 
0
  #2
Dec 21st, 2004
I don't believe this is possible as PHP is a scripting language, and therefore doesn't have the ability to gain control of hardware directly. For example, you wouldn't be very happy if you were surfing the web and various PHP-driven sites had direct access to your hard drive and hardware! What you're looking for should be possible through ActiveX controls. ActiveX controls are mini-programs (??) that are downloaded automatically over the Internet ... such as the way that the Windows Update website has control to install software to your hard drive automatically. Not sure how they work though ... that's a Microsoft thing.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #3
Dec 22nd, 2004
hi hi,

well, i think i;ll explain the scenario that i'm in. i'm doing a system whereby the client PC will request to print a list, and the list is of course sent to the server. On the server, it will analyze the list and dispatch the list to the correct orinter to print. Or maybe dispatching the list to several printers that I pre-set.

I want all of this to be done without the client PC having to select which printer to print to. Thus, I don't want the print dialog window to appear on the client PC.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: How To Print Directly to Printer

 
0
  #4
Dec 23rd, 2004
I'm not sure if there is a way to send files to the printer without the user's consent. That would be like hacking the enduser. The best you can do, from what I know so far, is that you can use Javascript to show the print dialog on a page (you can easily find the code for this online.)
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #5
Dec 25th, 2004
no,definitely not hacking. All I want is just this. The user on the client PC will click on a print button and the content of the page/form will be sent back to the server. The server will then dispatch the content to the appropriate printer. I just want to eliminate the step where the user needs to use the print dialog box. By the way, i need this for to do a web based application.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: How To Print Directly to Printer

 
0
  #6
Dec 25th, 2004
I didn't suggest that you were hacking, but this SOUNDS like it. What I mean is that, since it seems like hacking, I don't think it can be done. But I'm sure you can do it in a similiar method.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 24
Reputation: chunguy is an unknown quantity at this point 
Solved Threads: 0
chunguy's Avatar
chunguy chunguy is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #7
Dec 25th, 2004
thanks gary for your comments. don't worry, I wasn't offended by the hacking issue. I just want a solution to this problem. Thought perhaps there's someone out there who had come across this problem and had a way to get aound it.

Thanks anyway.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1
Reputation: xiaolee is an unknown quantity at this point 
Solved Threads: 0
xiaolee xiaolee is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #8
Feb 2nd, 2005
I guess the very first issue here is, PHP will be installed in your server. And there might be 2 issue, one is using WIN OS, and the other might be unix based os.
I know you can make use of LINUX command in PHP to trigger the printing. You can alos use normal DOS COMMANF in PHP if you are running WIN OS. It is simply the lineprint command or copy to lpt port. but I wouldn't know how can you track with the NETWORK Printer is ready, and able to print. Hope this does help. regarding the phpprinter command, it is only able to run in WINDOWS environment.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 234
Reputation: PoA is an unknown quantity at this point 
Solved Threads: 8
PoA PoA is offline Offline
Posting Whiz in Training

Re: How To Print Directly to Printer

 
0
  #9
Feb 3rd, 2005
I hope this would help you http://docs.php.net/en/ref.printer.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: How To Print Directly to Printer

 
0
  #10
Feb 3rd, 2005
Originally Posted by PoA
I hope this would help you http://docs.php.net/en/ref.printer.html
that has already been posted

Please next time read THE VERY FIRST POST
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC