printing an HTML file on a windows printer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dutch
    New Member
    • Feb 2007
    • 1

    printing an HTML file on a windows printer

    Greetings.

    I'm attempting to print an existing html file to a network printer.

    I tried opening a socket connection using the printer ip and port. With this, I was able to print the file path/name on the printer, ala...

    [CODE=perl] my $socket = IO::Socket::INE T->new(PeerAddr => $peerAddr,
    PeerPort => $peerPort,
    Proto => 'tcp',
    Type => SOCK_STREAM,
    );

    # If we can't print, display an error message and quit.
    if (! $socket) {
    my $errorText = "Couldn't connect to printer at $peerAddr\:$pee rPort : $@\n";
    printLog($ERROR , $method, $errorText, __LINE__);
    displayErrorWin ($errorText);

    exitScript(1);
    }

    printLog($DEBUG , $method,
    "##### Printing file: $fullFilePath to: $peerAddr\:$pee rPort",
    __LINE__);

    print $socket $fullFilePath;[/CODE]
    This at least showed I can "talk" to the printer.

    Next, I tried various flavors of using HTML::Stream without any success.

    I can print the html file from Internet Explorer.
    I appreciate any help.

    I thank you,
    Dutch
    Last edited by eWish; Nov 19 '07, 01:36 AM. Reason: Added Code Tags
Working...