How to Convert DOS Print Jobs to PDF with DOSPrinter

Written by

in

How to Print from DOS Applications in Windows 11 using DOSPrinter

Modern versions of Windows have completely dropped support for 16-bit DOS applications. While emulator software like DOSBox can help you run these legacy programs on Windows 11, getting them to print to modern USB, network, or wireless printers presents a significant challenge. DOS applications expect to send print jobs directly to physical hardware ports like LPT1 or COM1, which no longer exist on modern computers.

Fortunately, a utility called DOSPrinter bridges this gap. It captures the raw printer output from your DOS program and translates it into a format that modern Windows 11 printers can understand.

Here is a step-by-step guide to configuring and using DOSPrinter on Windows 11. Step 1: Download and Extract DOSPrinter First, you need to obtain the utility.

Download DOSPrinter from its official website or a trusted software repository.

Extract the downloaded ZIP file. You will find an executable file named DOSPrinter.exe.

Move DOSPrinter.exe to a dedicated, easily accessible folder on your local drive (for example, C:\DOSBox\DOSPrinter</code>). Step 2: Configure Your DOS Emulator to Output to a File

Because Windows 11 cannot directly read LPT1 port traffic from a DOS app, you must configure your DOS emulator (such as DOSBox or vDos) to redirect printer data into a standard text file. If you are using DOSBox: Open your dosbox.conf configuration file. Locate the [parallel] section.

Change the parallel port setting to redirect to a file. For example: parallel1=file append=false timeout=1000 rootdir=C:\DOSBox\ Use code with caution.

This setting forces DOSBox to write any data sent to LPT1 into a file named capture.prn (or similar, depending on your emulator version) inside your specified folder. Step 3: Run the DOSPrinter Command

DOSPrinter operates via the Windows Command Prompt. It monitors the text file generated by your emulator and sends it to your default Windows 11 printer. Open Command Prompt or PowerShell in Windows 11. Navigate to the folder where you saved DOSPrinter.exe. Execute the command using the following basic syntax: DOSPrinter.exe /SEL C:\DOSBox\capture.prn Use code with caution. Key Command Switches to Customize Your Output:

/SEL: Opens the standard Windows printer selection dialog, allowing you to choose which modern printer to use.

/PDF: Instead of physical printing, this switch instructs DOSPrinter to convert the document into a PDF file automatically.

/F[Font Name]: Specifies a specific Windows font to use for the print job (e.g., /FCourier New).

/LPI[number]: Adjusts the Lines Per Inch to ensure the spacing matches your original legacy layout. Step 4: Automate the Process with a Batch File

Manually typing commands every time you need to print defeats the purpose of an efficient workflow. You can automate the entire pipeline using a simple Windows Batch (.bat) script. Open Notepad on Windows 11.

Paste the following script, adjusting the file paths to match your system:

@echo off rem Start your DOS application here C:\DOSBox\dosbox.exe rem Wait for the DOS application to close, then process the print file timeout /t 2 C:\DOSBox\DOSPrinter\DOSPrinter.exe /SEL C:\DOSBox\capture.prn rem Clean up the capture file for the next print job del C:\DOSBox\capture.prn Use code with caution. Save the file as LaunchAndPrint.bat.

Run this batch file whenever you need to work in your DOS application. Once you trigger the print command inside the DOS app and close it, DOSPrinter will immediately handle the physical printing. Troubleshooting Common Issues

Blank Pages: If your printer outputs blank pages, ensure that the DOS application is actually writing data to your capture file. Open the .prn or .txt file in Notepad to verify text is present.

Garbled Text or Strange Characters: Legacy applications often use specific printer control codes (like Epson or IBM emulation codes). Try adding the /RAW switch to your DOSPrinter command if your modern printer driver supports raw data passthrough.

Truncated Margins: Use the /LAND switch for landscape documents, or use the font scale switches (/CPI) to reduce the character width so the text fits standard Letter or A4 margins.

To make sure this setup fits your workflow perfectly, let me know:

Which DOS emulator are you using? (DOSBox, DOSBox-X, vDos, etc.)

What type of documents are you printing? (Text reports, invoices with graphics, accounting ledgers?)

I can provide the exact configuration lines and batch scripts tailored to your specific software.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *