Raw printing directly to a USB printer, bypassing Windows spooler
Is there a way to bypass the spooler and output data straight to this USB printer?
Yes, absolutely. It's built into most OSs, printing raw via USB is just a bit less obvious than Ethernet and COM/LPT. Note, many applications, such as notepad are incapable of printing raw, so your application needs to support this as well.
- Install the appropriate driver for your USB printer. Check the printer properties to see which USB port it is using. It may be USB001, etc.
- Using the Devices and Printers, add a second printer. Local Port, Select the port just created (i.e. USB001) Note: Some versions of Windows have a checkbox to autodetect, if it's there, uncheck this.
- Manufacturer: Generic, Printer: Generic / Text Only
- Use the driver that is currently installed
- Give the printer a name that differentiates it from the one already created, i.e. Zebra TTP8200 Raw.
- Do not share
- Do not print test page, Finish
Now with your raw printing application, use the newly created printer.
P.S. These instructions are also available here, with screenshots, as part of a Java open source raw printing tutorial. The project provides tutorials for other platforms (Ubuntu, OS X) as well.
http://qzindustries.com/TutorialRawWin
-Tres
If the USB printer is available as a COM port, you can just write to the COM port. Like this, from the DOS prompt:
dir > com1
The former example will output the results of the dir
command to the printer.
Or, here is another example:
copy file.txt com1
The former example will output the contents of file.txt
to the printer.
Outputting properly formatted ZPL data will be harder than just plain text. I have gotten this to work from Linux using Ruby (and Epson/ESC commands), however.