If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Help - Print from our intranet to a specific printer on the network?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-27-05, 09:21
purpendicular purpendicular is offline
Registered User
 
Join Date: Mar 2004
Location: Rhode Island, USA
Posts: 55
Help - Print from our intranet to a specific printer on the network?

Maybe someone can help.

I'm building a request for service form and the department insists that they receive a printout to their printer when service is requested.
Their printer and intranet is on the local network at the hospital where I work.

I'm using php and mysql
Is there any way to link to maybe the printer name or ip address?
If other options are possible I'm totally open...

the mapped address for the printer would be:
\\lmcprof2\facmgrpr
and it's local ip address is 172.16.2.51

Thanks so much.
Ray
Reply With Quote
  #2 (permalink)  
Old 10-27-05, 12:24
jfulton jfulton is offline
Registered User
 
Join Date: Apr 2005
Location: Baltimore, MD
Posts: 297
You can use php printer functions.

Quote:
the department insists that they receive a printout to their printer when service is requested
Yes, this can be done using php. When you are processing the request, you'll need to create a document and send it to the printer.

Check out the printer functions (http://us2.php.net/manual/en/ref.printer.php).

I believe you would want to do something along the lines of:

PHP Code:
//processed request...now send to printer...
        
$location "\\lmcprof2\facmgrpr";
        
$message "My message...";

        
$handle printer_open($location);

        
printer_start_doc($handle"Request Received");
        
printer_start_page($handle);

        
$font printer_create_font("Arial"7248400falsefalsefalse0);
        
printer_select_font($handle$font);
        
printer_draw_text($handle$message1010);
        
printer_delete_font($font);

        
printer_end_page($handle);
        
printer_end_doc($handle);
        
printer_close($handle); 
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On