i need printing help please

Discussion in 'PHP' started by white10, Jan 8, 2008.

  1. #1
    I have a bit of a problem I have a database, now I want to do 2 things with it. I want sent an html newsletter with images to the clients in the database and I want to print that newsletter directly to the printer but it (the printing) must loop over the records in the database. Can anyone of you guys help me please? Thanks...
     
    white10, Jan 8, 2008 IP
  2. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2

    First off can you be a bit more specific?

    Possibly paste code?


    Secondly you are tying to send an email that autoprints?
     
    LittleJonSupportSite, Jan 8, 2008 IP
  3. white10

    white10 Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry for relying so late, was busy on another project,
    I want to print a page directly to the printer and it should also display the images. I managed to print to the printer but it only prints the raw html. any suggestions...

    <?php
    $handle1 = "<html><body><img src=\"one.gif\" width=\"202\" height=\"140\" /></body></html>";

    //eval("\$handle1 = \"$handle1\";");
    $printer = "Color printer"; //This info has been changed for privacy reasons

    $handle = printer_open($printer);
    printer_set_option($handle, PRINTER_MODE, "raw");
    printer_write($handle, "$handle1");
    printer_close($handle);
    echo $printer;
    //echo $handle1 ;
    ?>
     
    white10, Jan 11, 2008 IP