Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

How do I send a file to the printer on Win32?

by munchie (Monk)
on Apr 14, 2002 at 20:10 UTC ( #158993=perlquestion: print w/replies, xml ) Need Help??

munchie has asked for the wisdom of the Perl Monks concerning the following question: (files)

How do I send a file to the printer on Win32?

Originally posted as a Categorized Question.

  • Comment on How do I send a file to the printer on Win32?

Replies are listed 'Best First'.
Re: How do I send a file to the printer on Win32?
by munchie (Monk) on Apr 14, 2002 at 20:11 UTC
    It's very easy, as I recently discovered.
    use File::Copy; copy($file,'lpt1:');
Re: How do I send a file to the printer on Win32?
by Anonymous Monk on Jun 07, 2002 at 12:53 UTC
    There is also another trick to write directly to a named printer, assuming the printer is shared and using the UNC syntax:
    copy($file,'//host/printername');
      copy ($print_file, '//hp-exch/HP4100-IS'); this command is working great except I don't know how to send a "\n" to the printer. The print out only displays the first line and nothing else... Any help would be greatly appreciated. Thanks, Brian bvolk@hpproducts.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2021-04-21 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?