DOSBox-X provides comprehensive printing support through parallel port (LPT) emulation and a built-in virtual dot-matrix printer. DOS programs that send output to LPT1 can have that output redirected to a file on your host system, rendered as a raster image or PostScript document, or even forwarded to a real physical printer attached to the host on Windows. This makes it possible to extract reports, documents, and graphics from DOS software that would otherwise be lost.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/joncampbell123/dosbox-x/llms.txt
Use this file to discover all available pages before exploring further.
How Printing Works in DOSBox-X
The printing system has two layers:- Parallel port (
[parallel]section): Determines what is connected to each of the up to nine emulated LPT ports. Each port can be left disabled, wired to a file, connected to the virtual printer engine, or passed through to real hardware. - Virtual printer (
[printer]section): A software dot-matrix printer engine that interprets the byte stream from a parallel port and renders it as image or PostScript output.
LPT1, which corresponds to parallel1 in DOSBox-X configuration.
Parallel Port Configuration
The[parallel] section has a setting for each of the nine emulated ports (parallel1 through parallel9).
Parallel Port Device Options
| Value | Description |
|---|---|
disabled | Port is present but nothing is connected — print jobs are silently discarded |
printer | Connect to the virtual dot-matrix printer engine (configured in [printer]) |
file | Write raw output to a file in the captures directory, with optional auto-open programs |
reallpt | Pass through to a real parallel port on the host (Windows, Linux with root, or BSD with root) |
disney | Attach a Disney Sound Source emulation device to this port |
File Output Parameters
When usingparallel1 = file, you can append parameters on the same line:
| Parameter | Description |
|---|---|
file:<name> | Write to a specific file; without this, files go to the captures directory |
append:<file> | Append to an existing file rather than overwrite |
timeout:<ms> | Close and finalise the file after this many milliseconds of inactivity |
openps:<program> | Launch this program when output is detected as PostScript |
openpcl:<program> | Launch this program when output is detected as PCL |
openwith:<program> | Launch this program for all other output |
addFF | Append a form-feed character when closing the file |
addLF | Append a line-feed if the DOS application does not |
cp:<codepage> | Translate from the specified DOS code page (e.g. cp:437) |
LPT1 through LPT3 are the standard parallel ports in DOS. LPT4 through LPT9 are extended ports supported by DOSBox-X. You can optionally specify base I/O addresses and IRQs for extended ports using
base: and irq: parameters.Virtual Printer Engine
When a parallel port is set toprinter, output is handled by DOSBox-X’s built-in dot-matrix printer emulator. This engine interprets Epson-compatible ESC/P control codes and renders each page as an output file.
Printer Settings
| Option | Default | Description |
|---|---|---|
printer | true | Enable the virtual printer engine |
dpi | 360 | Output resolution in dots per inch |
width | 85 | Page width in tenths of an inch (85 = 8.5 inches) |
height | 110 | Page height in tenths of an inch (110 = 11.0 inches — US Letter) |
printoutput | png | Output format: png, ps (PostScript), bmp, or printer (Windows physical printer) |
multipage | false | Combine all pages into a single PostScript file or printer job until Ctrl+F2 is pressed |
device | - | Windows printer device name or index. - shows the Print dialog once; empty shows it every time |
docpath | . | Directory where output files are saved |
fontpath | FONTS | Directory containing TrueType printer fonts (courier.ttf, ocra.ttf, roman.ttf, sansserif.ttf, script.ttf) |
openwith | (none) | Program to launch automatically when an output file is created |
openerror | (none) | Program to launch if an error occurs during output |
shellhide | false | Hide the command window when launching openwith/openerror on Windows |
timeout | 0 | Milliseconds of inactivity before the current page is auto-ejected. 0 means never eject automatically |
printdbcs | auto | Print Chinese/Japanese/Korean double-byte characters when a DBCS code page is active |
Output Format Comparison
- PNG (Default)
- PostScript
- BMP
- Windows Printer
Each printed page is saved as a PNG image file at the configured DPI. PNG is lossless and universally viewable.Best for: Screenshots, graphics, general-purpose archiving of printed output.
Printing from a DOS Application
Configure the parallel port
In your DOSBox-X configuration file, set
parallel1 = printer and configure the [printer] section with your desired output format and path.Start DOSBox-X
Launch DOSBox-X with your updated configuration. The virtual printer is ready as soon as the emulator starts.
Select LPT1 in the DOS application
In the DOS program’s printer setup, choose
LPT1 (or PRN) as the printer port. Install an Epson-compatible dot-matrix printer driver if the application asks which printer model to use.Print your document
Initiate printing from within the DOS application. DOSBox-X intercepts the LPT1 data stream and passes it to the virtual printer engine.
Real Parallel Port Passthrough
On Windows, configure passthrough with the real port’s base address:lp group):
DBCS (Double-Byte Character) Printing
DOSBox-X can print Chinese, Japanese, and Korean double-byte characters when one of the corresponding code pages is active (932 = Japanese, 936 = Simplified Chinese, 949 = Korean, 950 = Traditional Chinese). Theprintdbcs option controls this behavior:
| Value | Behavior |
|---|---|
auto | Enable DBCS printing only when TrueType font (TTF) output mode is active with DBCS support |
true | Always enable DBCS character printing |
false | Disable DBCS character printing |
fontpath directory for DBCS output to render correctly.