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...
Expand|Select|Wrap|Line Numbers
- my $socket = IO::Socket::INET->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\:$peerPort : $@\n";
- printLog($ERROR, $method, $errorText, __LINE__);
- displayErrorWin($errorText);
- exitScript(1);
- }
- printLog($DEBUG, $method,
- "##### Printing file: $fullFilePath to: $peerAddr\:$peerPort",
- __LINE__);
- print $socket $fullFilePath;
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