Re^2: Raw Data to Printer on Win XP
by dvergin (Monsignor) on Sep 29, 2004 at 22:16 UTC
|
Well, yes. I had thought of that (or something similar). But:
>net use LPT1:
System error 2 has occurred.
The system cannot find the file specified.
And besides, the printer is not on the network. It's attached to USB002 on my laptop (which, to my frustration, lacks a parallel port). I had figured to use MODE to redirect LPT1 to USB002. But I could not make it work. Here's a MODE status request as an example of at least part of the problem:
>mode LPT1: /status
Illegal device name - LPT1
It would be great if I could activate LPT1 and then redirect it to point at USB002. Any clues? | [reply] |
|
Does your usb device show up as a COMn: port if you do just issue the "mode" command alone?
If so, you can redirect LPT to it using
Redirect printing: MODE LPTn[:]=COMm[:]
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
| [reply] [d/l] |
|
>mode
Status for device CON:
----------------------
Lines: 300
Columns: 80
Keyboard rate: 31
Keyboard delay: 1
Code page: 437
That's it. So I guess the answer to your question is 'No'. Is there a way to configure the USB port to appear that way? | [reply] |
|
|
|
i was of the understanding that usb printer drivers communication is different than on parallel, so i don't think it will work -- otherwise you can create any port you like in the windows printer control panel. and if the MODE thing doesn't work for you, there's a win32 port re-director called "redmon". If redirecting from lpt1 to usb works for you, please let us know.
| [reply] |
|
|
mode /LPT1: /status should have been successful. On my system is replies that LPT1 is not redirected. Can you print at all (outside of Perl) from the CMD prompt? There have been issues in teh past with USB printing from the cmd line. If that is an issue you may have to update your drivers.
HTH
| [reply] |
|
>print temp.txt
Unable to initialize device PRN
Also, Control-P (am I remembering correctly how to toggle printing of console activity?) doesn't work either. It appears as "^P" and nothing happens. Hit return and you get: "'►' is not recognized as an internal or external command, operable program or batch file."
Is there any other way to print from the console?
"you may have to update your drivers". Which drivers? USB? | [reply] |
Re^2: Raw Data to Printer on Win XP
by aquarium (Curate) on Sep 29, 2004 at 21:01 UTC
|
question is how to print raw data to printer -- NOT how to re-direct a port!!!!
in the plethora of options for most decent printer drivers, you get an option to print RAW data, so that's accessed through the printer's control panel. then it's only a matter of actually sending the output to the printer...which i'm not too sure on. | [reply] |
|
| [reply] |
|
I was quite hopeful when I first ran across Win32::Printer during the course of this current quest. In fact, I went ahead and installed it for use later with other projects.
But in reading and re-reading the docs. And in re-reading them yet again before responding to your suggestion just now, I can find no way to use that module to send a raw string as-is directly to the printer. After my eyes got "scrolled-out" I finally tried a text search for 'raw' and 'direct' in the pod. But no good.
I'd love for you to point out the option for that module I have missed that allows such a thing.
| [reply] |
|
Since the OP has "brushed up on MODE" which alows you to re-direct printer ports I figured it was on topic. You can often also FTP directly to the newer printers. Putting a file will cause a the printer to print it, it will also bypass the print server queue. :-) Of course that may not solve you problem either. Just my 2 cents.
| [reply] |
|
| [reply] |