- or download this
system("notepad.exe /p \"filename.txt\"");
- or download this
system("print [/D:device] [[drive:][path]filename[...]]");
- or download this
$|=1;
my $i=0;
...
close SPOOL;
system("copy /B $spoolfile LPT1:");
unlink $spoolfile;
- or download this
open( LPT, "+>LPT1" ) or die "Can't access printer: $!";
print LPT "Text to print\n\f";
close (LPT);
- or download this
#! perl -w
use strict;
...
$EndDocPrinter->Call($hprinter) or ShowError('EndDocPrinter');
$ClosePrinter->Call($hprinter);
}
- or download this
$file="foo.txt";
print `type $file > lpt1:`;
print `echo "\f" > lpt1:`;
- or download this
if (-e "$ENV{'WINDIR'}/System32/mshtml.dll") {
$dll = "$ENV{'WINDIR'}/System32/mshtml.dll";
...
#note: can't use this to print multiple files
system("rundll32.exe $dll,PrintHTML $outfile");