Re: Multiple Line output using Win32::Printer
- From: "Jack D" <goodcall1@xxxxxxxxxxxxxxx>
- Date: Thu, 08 Jun 2006 21:37:37 GMT
"l v" <veatchla@xxxxxxxxx> wrote in message
news:1149800427.838297.218040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jack D wrote:force
I'm trying to output mutilple lines to a printer using Win32::Printer. I
have only suceeded in printing one line so far. Does anyone know how
eachit to print multiple lines? The output is shows rectangles in between
toword.
Sample code below
use strict;
use Win32::Printer;
my @array = keys %ENV;
printMultiple();
sub printMultiple {
my $dc = new Win32::Printer( papersize => A4,
description => 'Test,
unit => 'mm') or die "Failed
create printer object";
if ($dc) {
my $textToPrint = join("\r\n",@oldarray);
my $font = $dc->Font('Times New Roman', 12);
$dc->Font($font);
$dc->Color(0, 0, 0);
$dc->Write($textToPrint, 10, 10);
$dc->Close;
}
}
__END__
Jack
What does you print show when you change the "\r\n" in the join to ':'?
my $textToPrint = join(':',@oldarray);
Is this a trick question? It prints the colon of course.
Jack
.
- Follow-Ups:
- References:
- Multiple Line output using Win32::Printer
- From: Jack D
- Re: Multiple Line output using Win32::Printer
- From: l v
- Multiple Line output using Win32::Printer
- Prev by Date: RXParse module v.91 (by robic0)
- Next by Date: Re: filename charset and internal Perl utf8
- Previous by thread: Re: Multiple Line output using Win32::Printer
- Next by thread: Re: Multiple Line output using Win32::Printer
- Index(es):
Relevant Pages
|