#!/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();
Zuletzt bearbeitet: Dezember 19, 2020

Autor

Kommentare

Kommentar verfassen

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.