"Raw" Printing for Windows 8 or 10


A utility for "raw" printing under Windows 8 or 10 (thanks to Tony Edgecombe)

When a file is sent directly to a printer, without being modified by printer driver software on the computer, it is said to be printed "raw." Raw printing was simple and straightforward in Windows versions up to and including Windows 7, but is suprisingly difficult under Windows 8 and later Windows versions, including Windows 10. The reasons for this are spelled out by Tony Edgecombe in this blog post.

The only Windows software I have found that can send a file directly to a printer under Windows 8 or 10 is Bojan Banko's DOSPrinter, which costs $40 for a single-user license. DOSPrinter is excellent software, with many capabilities, but $40 seems a high price to pay if all you want it for is "raw" printing.

Tony Edgecombe has written a .net library that sends a file directly to the printer, but this library needs to be compiled in Microsoft Visual Studio 2015 before it can be used. The source code can be downloaded from this link. When compiled, it includes an executable file and dynamic link library that can be used from the command line to provide raw printing.

With advice from Jos Schaars, I used Microsoft's ILMerge utility to combine the compiled executable file and dynamic link library into a single RawPrint.exe command-line utility, which may be downloaded from this link. The syntax for the utility is as follows, with both parameters required:

RawPrint "Name of Your Printer" filename

The utility requires the .NET 4 runtime software, typically installed in all modern Windows systems.


A convenient interface for RawPrint: RawFileToPrinter.exe

For convenience, I have also wrapped the command-line utility in a GUI executable (a compiled AutoIt script) so that it can be used to send a file to the default Windows printer without specifying a printer name. You may download RawFileToPrinter.exe from this link.

Note: If your antivirus software mistakenly tells you that the program is dangerous (because your antivirus software ignorantly warns about any program created with AutoIt), it is up to you to decide whether or not to believe your antivirus software. If you don't trust this software, don't use this software! Don't waste your valuable time sending me an e-mail asking whether the program is safe!

The syntax for RawFileToPrinter is the same as the syntax for my PDFtoPrinter.exe utility. To send raw data to the default Windows printer, use:

RawFileToPrinter filename.ext

To send raw data to a specific Windows printer, add the name of the printer in quotation marks:

RawFileToPrinter filename.ext "Name of printer"

If you want to print to a network printer, use the name that appears in Windows print dialogs, like this (and be careful to note the two backslashes at the start of the name and the single backslash after the servername):

RawFileToPrinter filename.ext "\\SERVER\PrinterName"

If you mistype the printer name or specify a printer that does not exist, nothing will print, but no error message will be displayed.

If you want to select from a list of installed printers, change the name of the program so that the string Select is part of it; for example: RawFileToPrinterSelect.exe. When launched, it will pop up a list of installed printers, unless you specify a printer name on the command-line, in which case it will print to the specified printer, without displaying a menu.

If you need to send a form feed to the printer after the raw data (in order to eject the page), then add the string FF to the name of program; for example: RawFileToPrinterFF.exe. You can add both Select and FF if necessary.

You may use this program with vDos or vDosPlus (versions dated 01.10.2016 or later only), by using this sytnax in config.txt:

LPT1 = "RawFileToPrinter.exe" #LPT1.ASC

You can specify a printer by adding the printer name in quotation marks, like this:

LPT1 = "RawFileToPrinter.exe" #LPT1.ASC "Microsoft XPS Document Writer"

If you want to print to a network printer, use the name that appears in Windows print dialogs, like this (and be careful to note the two backslashes at the start of the name and the single backslash after the servername):

LPT1 = "RawFileToPrinter.exe" #LPT1.ASC "\\SERVER\PrinterName"

You may change the name of the program as described above to select a printer or send a formfeed after the data.


An alternative Windows executable: RawWinPrinter.exe

The utility described above replaces an earlier version that may be more convenient in some circumstances. It uses a different syntax and has different options. It is named RawWinPrinter.exe and you may download it from this link.

Note: If your antivirus software mistakenly tells you that the program is dangerous (because your antivirus software ignorantly warns about any program created with AutoIt), it is up to you to decide whether or not to believe your antivirus software. If you don't trust this software, don't use this software! Don't waste your valuable time sending me an e-mail asking whether the program is safe!

You may use RawWinPrinter.exe in a variety of ways. You may drop a file on it, and it will send the file directly to the default Windows printer. Or, if you double-click it (or launch it from the Windows command line), it will prompt you to select a file that it will send to the default Windows printer.

You may want to create a desktop shortcut in which you may add a parameter like this to the Target field in the shortcut properties:

-p "Name of Your Printer"

When you drop a file on this shortcut, the file will be printed to the specified printer.

You may also run the program from the Windows command line, with this syntax:

RawWinPrinter [-p "Name of Your Printer"] filename

The parameters in square brackets are optional; if they are omitted, the file will be printed to the default Windows printer. To specify a printer with RawWinPrinter, you must use hyphen-p followed by a space, followed by the name of the printer (if the printer has one or more spaces in its name, quotation marks are required around the name).

If you rename RawWinPrinter.exe so that it contains the string "CLI" (not case-sensitive) it will act like a console program, and will not display any menus or error messages, and all errors will simply cause the program to exit. (It is not actually a console program, but will not interact with the GUI.)

The program does not check whether the printer name that you supply is correct or not. If nothing prints, then check your typing of the printer name.


Edward Mendelson (em thirty-six [at] columbia [dot] edu, but with two initials and two numerals before the [at] sign, not spelled out as shown here).