Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: Raw Data to Printer on Win XP

by BrowserUk (Pope)
on Sep 30, 2004 at 14:58 UTC ( #395367=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Raw Data to Printer on Win XP
in thread Raw Data to Printer on Win XP

As I said, I don't have a usb printer, so I cannot test he theory. However, I belive that usb printers are basically serial printers eg. COMn:-like. I do know that you can redirect LPT1 to COMn:

P:\test>mode /status Status for device LPT1: ----------------------- Printer output is not being rerouted. Status for device COM1: ----------------------- Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: OFF DSR handshaking: OFF DSR sensitivity: OFF DTR circuit: ON RTS circuit: ON P:\test>mode /status Status for device LPT1: ----------------------- Printer output is being rerouted to serial port COM1 Status for device COM1: ----------------------- Baud: 1200 Parity: None Data Bits: 7 Stop Bits: 1 Timeout: OFF XON/XOFF: OFF CTS handshaking: OFF DSR handshaking: OFF DSR sensitivity: OFF DTR circuit: ON RTS circuit: ON

So, if usb are (or present themselves to the system as) serial ports, then it is entirely possible to re-route LPT1 to a usb printer.

The OP chose to set his usb printer to masquarade as LPT1 directly. Personally I would have chosen to have it set as a COM1:, then, should I ever attach a second printer to a serial port or another usb, I could set that to COM2: and chose which of the two my CLI apps wrote to by using the MODE command above.

I've had this set up on networked systems with half a dozen different local and network printers and it make life quite convenient.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon


Comment on Re^5: Raw Data to Printer on Win XP
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2014-11-29 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (204 votes), past polls