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

Re: How To Print Directly to Printer

 
0
  #11
Feb 7th, 2005
Originally Posted by xiaolee
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.
can you elaborate a bit more of the how to lineprint to copy to lpt port ? pardon me for my ignorance.

btw, POA i'm running win XP, it seems that the functions listed there does not support win xp... although someone posted on the user contribution that it can actually be used on XP too. tried email-ing the person but to no response. http://my.php.net/manual/en/ref.printer.php
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: How To Print Directly to Printer

 
0
  #12
Feb 7th, 2005
Say after me: you can not access hardware on the client machine from a serverside application or script.

You CAN print from your serverside application to any printer which is attached to the server (if PHP supports that...), but never to the client.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1
Reputation: gmalcolm is an unknown quantity at this point 
Solved Threads: 0
gmalcolm gmalcolm is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #13
Apr 27th, 2005
Oh yes you can...

Of course PHP can print to a printer linked to the server. It's called an intranet! Most PHP is coded as internal utilities within companies... not on external websites. Try the PECL php_printer.dll install and then use the print functions. On Unix just do a system('lpr')...
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 2
Reputation: stoopidnerd is an unknown quantity at this point 
Solved Threads: 0
stoopidnerd stoopidnerd is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #14
Dec 28th, 2006
Originally Posted by cscgal View Post
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.
Visual basic can produce activex programs
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 23
Reputation: psycho007 is an unknown quantity at this point 
Solved Threads: 0
psycho007 psycho007 is offline Offline
Newbie Poster

Re: How To Print Directly to Printer

 
0
  #15
Oct 30th, 2008
you can print directly to a printer held on the clients machine. the php_printer.dll is needed which can be found in the PECL downloads.

once you have downloaded and copyed the php_printer.dll into your extensions folder i.e. c:\php\ext edit the php.inin in c:\php\ and add a line extension=php_printer.dll line in the extensions section, re start iis or apache webserver.

Check that the php extensions has loaded by creating a info.php file containing
  1. <?php
  2. phpinfo();
  3. ?>

scroll down for printer settings this will determine that the extensions is initialised correctly

Then on the php.net website do a search for printer_set_option for printer function and you will see all the printer fuctions that php has to offer.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: achunawala is an unknown quantity at this point 
Solved Threads: 0
achunawala achunawala is offline Offline
Newbie Poster

Was this issues solved?

 
0
  #16
Nov 3rd, 2009
Hi I am faced with a similar problem where I'd like to eliminate the additional step of the print dialog box and have php select and sent the print job to the appropriate printer. I was wondering if anyone found a solution to this problem ...

Thank you for your help!
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC