I don't know how to send to the default printer, but to send ascii text to a windows printer, you can share the printer, then open the share just like a normal file.
You may have to send a final form-feed character to get the last page out of the printer. Open FILE ">\\\\mycomputer\\PrinterShare"; Print FILE "My text here"; -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jon Bjornstad Sent: Wednesday, December 16, 2009 3:03 AM To: [email protected] Subject: Printing on Win32 Esteemed Perl-Win32 people, How do I send a plain ASCII text file to the default printer from a Perl program? Win32::Printer has been discontinued (or so says CPAN) and as far as I know it is not available from activestate.com for Perl 5.10. I need to do this from XP, Vista, and beyond. Failing a CPAN module is there a way to have my script invoke notepad.exe and send it the keystrokes to have it do the print for me? Thank you very much! Jon _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
