Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    55

    Unanswered: 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

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297

    You can use php printer functions.

    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); 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •