Skip to main content

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.

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.

How Printing Works in DOSBox-X

The printing system has two layers:
  1. 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.
  2. 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.
Most DOS programs address their printer as 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]
parallel1 = printer
parallel2 = disabled
parallel3 = disabled

Parallel Port Device Options

ValueDescription
disabledPort is present but nothing is connected — print jobs are silently discarded
printerConnect to the virtual dot-matrix printer engine (configured in [printer])
fileWrite raw output to a file in the captures directory, with optional auto-open programs
reallptPass through to a real parallel port on the host (Windows, Linux with root, or BSD with root)
disneyAttach a Disney Sound Source emulation device to this port

File Output Parameters

When using parallel1 = file, you can append parameters on the same line:
parallel1 = file file:output.prn timeout:1000 openps:gswin64c openwith:notepad
ParameterDescription
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
addFFAppend a form-feed character when closing the file
addLFAppend 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 to printer, 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

[printer]
printer     = true
dpi         = 360
width       = 85
height      = 110
printoutput = png
multipage   = false
device      = -
docpath     = .
fontpath    = FONTS
timeout     = 0
OptionDefaultDescription
printertrueEnable the virtual printer engine
dpi360Output resolution in dots per inch
width85Page width in tenths of an inch (85 = 8.5 inches)
height110Page height in tenths of an inch (110 = 11.0 inches — US Letter)
printoutputpngOutput format: png, ps (PostScript), bmp, or printer (Windows physical printer)
multipagefalseCombine 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
fontpathFONTSDirectory 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
shellhidefalseHide the command window when launching openwith/openerror on Windows
timeout0Milliseconds of inactivity before the current page is auto-ejected. 0 means never eject automatically
printdbcsautoPrint Chinese/Japanese/Korean double-byte characters when a DBCS code page is active

Output Format Comparison

Each printed page is saved as a PNG image file at the configured DPI. PNG is lossless and universally viewable.
[printer]
printer     = true
dpi         = 360
printoutput = png
docpath     = ~/prints
Best for: Screenshots, graphics, general-purpose archiving of printed output.

Printing from a DOS Application

1

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.
2

Start DOSBox-X

Launch DOSBox-X with your updated configuration. The virtual printer is ready as soon as the emulator starts.
3

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.
4

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.
5

Retrieve the output file

Output files appear in the directory specified by docpath. If openwith is set, the specified application opens each file automatically. For PostScript multi-page output, press Ctrl+F2 to flush and finalise the document.

Real Parallel Port Passthrough

Parallel port passthrough (reallpt) requires administrator/root privileges on the host and a physical parallel port. Modern PCs and laptops rarely include parallel ports. Use a PCI or PCIe parallel port card, or a USB-to-parallel adapter if supported by your OS.
On Windows, configure passthrough with the real port’s base address:
[parallel]
parallel1 = reallpt realbase:378
On Linux, use the device path (requires root or the user to be in the lp group):
[parallel]
parallel1 = reallpt realport:/dev/parport0

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). The printdbcs option controls this behavior:
ValueBehavior
autoEnable DBCS printing only when TrueType font (TTF) output mode is active with DBCS support
trueAlways enable DBCS character printing
falseDisable DBCS character printing
Ensure appropriate TrueType fonts are present in the fontpath directory for DBCS output to render correctly.

Build docs developers (and LLMs) love