Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Printing in NT

by dree (Monsignor)
on Aug 28, 2002 at 14:34 UTC ( [id://193470]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    system("notepad.exe /p \"filename.txt\"");
    
  2. or download this
    system("print [/D:device] [[drive:][path]filename[...]]");
    
  3. or download this
    $|=1;
    my $i=0;
    ...
    close SPOOL;
    system("copy /B $spoolfile LPT1:");
    unlink $spoolfile;
    
  4. or download this
    open( LPT, "+>LPT1" ) or die "Can't access printer: $!";
    print LPT "Text to print\n\f";
    close (LPT);
    
  5. or download this
    #! perl -w
    use strict;
    ...
        $EndDocPrinter->Call($hprinter) or ShowError('EndDocPrinter');
        $ClosePrinter->Call($hprinter);
    }
    
  6. or download this
    $file="foo.txt";
    print `type $file > lpt1:`;
    print `echo "\f" > lpt1:`;
    
  7. 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");
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://193470]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-24 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found