CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Printing with IO::Socket::INET

 



AlphaScorpious
Novice

Dec 6, 2013, 2:42 PM

Post #1 of 2 (1509 views)
Printing with IO::Socket::INET Can't Post

I have the following code:


Code
#!/usr/bin/perl 
use warnings;
use strict;
use IO::Socket::INET;

my $nlcr = chr(10).chr(13);
my $remote_host = 'XX.XX.XX.XX';
my $remote_port = 'XXXX';
my $socket = IO::Socket::INET->new(PeerAddr => $remote_host,PeerPort => $remote_port,Proto => 'tcp',Type => SOCK_STREAM) || die "Couldn't connect to $remote_host\:$remote_port : $!\n";

print $socket "Hello world\n";

$socket->close();



The $remote_host is the IP address of the printer on the network.

Is there a way I can set the printer's fonts, margins, etc?


FishMonger
Veteran / Moderator

Dec 6, 2013, 2:57 PM

Post #2 of 2 (1507 views)
Re: [AlphaScorpious] Printing with IO::Socket::INET [In reply to] Can't Post

Take a look at the related postscript modules.
http://search.cpan.org/search?query=postscript&mode=all

This one looks like the best starting point.
http://search.cpan.org/~cjm/PostScript-File-2.20/lib/PostScript/File.pm

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives