#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    0

    Php print data in printer


    <?php
    $printer = "\\\\Reception.SHEIMA.LOCAL\\EPSONTM";
    $handle = printer_open($printer);
    if($handle)
    echo "connected";
    else
    echo "not connected";
    printer_set_option($handle, PRINTER_MODE, "raw");
    printer_set_option($handle, PRINTER_PAPER_FORMAT, PRINTER_FORMAT_A5);

    printer_write($handle, "hai");
    printer_close($handle);
    ?>


    its connected but not taking print pls help
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,572
    Rep Power
    595
    Please enclose your code in [ PHP ] tags. See the sticky at the top of this forum that says READ THIS BEFORE POSTING.

    What error are you getting?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    696
    Rep Power
    7
    Your if/else statement is missing a few characters, so I'm assuming you are using a basic text editor like Notepad. Try something like PSPad or Notepad++. This will highlight and color text to help make sure you have what is needed character-wise.

IMN logo majestic logo threadwatch logo seochat tools logo