For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > March 2005 > Net::Printer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Net::Printer
Brian Volk

2005-03-29, 8:56 pm

I using the program below to send file to printer.... It's printing a blank
page and giving the error below. Anyone have any ideas?


C:\brian\Perl>perl send_to_printer3.pl
Use of uninitialized value in sprintf at C:/Perl/site/lib/Net/Printer.pm
line 742.
Use of uninitialized value in sprintf at C:/Perl/site/lib/Net/Printer.pm
line 742.

---begin

use strict;
use warnings;
use Net::Printer;

my $lineprinter = new Net::Printer (

filename => "C:/brian/test/12345.html",
printer => "HP4100-IS",
server => "hp-exch",
port => "515",
lineconvert => "YES"

);

my $result = $lineprinter->printfile();


---end

Thanks!

Brian Volk
HP Products
317.298.9950 x1245
<mailto:bvolk@hpproducts.com> bvolk@hpproducts.com



Steven Schubiger

2005-03-29, 8:56 pm

On 29 Mar, Brian Volk wrote:

> I using the program below to send file to printer.... It's printing a
> blank page and giving the error below. Anyone have any ideas?


> C:\brian\Perl>perl send_to_printer3.pl
> Use of uninitialized value in sprintf at
> C:/Perl/site/lib/Net/Printer.pm line 742.
> Use of uninitialized value in sprintf at
> C:/Perl/site/lib/Net/Printer.pm line 742.


Net::Printer docs excerpt:

Please note that this module only talks to print servers that speak
BSD. It will not talk to printers using SMB or SysV unless they are
set up as BSD printers. CUPS users will need to set up B<cups-lpd> to
provide legacy access. ( See L</"Using Net::Printer with CUPS"> )

--
Steven Schubiger
<steven@accognoscere.org>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com