#!/usr/bin/env perl use strict; use warnings; use Net::Printer; # Create new Printer Object # lineconvert => "YES" ... for txt files # lineconvert => "NO" .... e.g. for pdf/ps files # works with Lexmark T654DN (prints in duplex) and E460DN (prints each page seperately) my $lineprinter = new Net::Printer( server => "192.168.123.123", port => 515, lineconvert => "NO", rfc1179 => "NO", debug => "YES", timeout => 30 ); # Print the file #my $result = $lineprinter->printfile("/testdir/bubu.test"); my $result = $lineprinter->printfile("/testdir/test.pdf"); #my $result = $lineprinter->printfile("/testdir/ftp-traffic.ps"); # Did I get an error? my $errstr = $lineprinter->printerror(); # Get Queue Status my @result = $lineprinter->queuestatus();
This website uses cookies so that we can offer you the best possible user experience. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Kommentare