Subject: | font specification |
Win32-Printer-0.8.0
I have successfully incorporated this printer dialog with my system using perl 5.8. The only problem I have with this dialog is that I have been unable to change the font. The following snippet is almost identical to your document example:
############################################################################
sub printfiles #05/03/02 1:10:PM
############################################################################
{
$args = @_; # number of files to print
use Win32::Printer;
my $dc = new Win32::Printer(
papersize => LEGAL, orientation => LANDSCAPE,
dialog=> NOSELECTION,
description => 'Mevs Balancing',
unit => 'mm'
);
my $font = $dc->Font('Courier', 8);
$dc->Font($font);
$dc->Color(0, 0, 0);
####################################################################
foreach (@_) {
$input = $_; # name of file to be printed
open (INPUT, "< $input" ) || die "Can't open $input file";
$x = 10;
$y = 10;
while (<INPUT>)
{
$output = $_;
$dc->Write($output, $x, $y);
$y = $y + 5;
}
$dc->Page();
}
$dc->Close();
}
1;
Instead of font "courier", get arial. Anyone else having this problem?