Printing on LPT1 or COM1 on NT Perl 
Author Message
 Printing on LPT1 or COM1 on NT Perl

                Does any one know how to send prints directly to the
printer either on LPT1 or COM1.

I could not find any reference to it in the Perl Docs.

I have a requirement to send single lines of text immediately to the
printer, which is a dot matrix printer, for information alarms.

I tried sending to a file and then printing a file using system(print
/D:com1 filename), but this ends up printing the whole page, even if
there is only 1 line of text.

thanks

Russ Parker



Wed, 18 Jun 1902 08:00:00 GMT  
 Printing on LPT1 or COM1 on NT Perl
Russ:

Quote:
> Does any one know how to send prints directly to the printer either on

LPT1 or COM1.

For direct control of a serial port, you can use Win32::SerialPort from
CPAN.  Check the readme while you're there, as it depends upon another
module (Win32::API?).

David Christensen

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----



Wed, 18 Jun 1902 08:00:00 GMT  
 Printing on LPT1 or COM1 on NT Perl
Hi David and Russ:

Quote:
>> Does any one know how to send prints directly to the printer
>> either on LPT1 or COM1.

> For direct control of a serial port, you can use Win32::SerialPort
> from CPAN.

While that is true, you would have to do any reformatting that
is usually handled by the printer driver. Hence, it is not suitable
for anything except the simplest text files.

I think Russ wants to submit print jobs to the NT spooler.
There has been lots of discussion of this on the win32-users
list. He might want to look at the list archives at ActiveState.
As I recall, it is possible (at least for LPT1) - but not obvious.

-bill
Making computers work in Manufacturing for over 25 years (inquiries welcome)



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. interrupting a print job sent to lpt1

2. printing to LPT1

3. How to print to LPT1:?

4. SCRIPT THAT PRINTS TO LPT1:

5. PERL/NT how to write to COM1

6. neet help with NT COM1

7. Accessing COM1 under NT

8. NT4, Perl 5, output to LPT1?

9. MSDOS perl -- opening com1??

10. MSDOS perl -- opening com1?

11. Reading From Com1 in Perl ... Please Help

12. Howto open COM1: in dos Perl

 

 
Powered by phpBB® Forum Software