This page describes a slightly modified version of DOSBox-X that makes it easy to print from DOS applications to Windows and macOS printers. Starting with macOS Sonoma, the built-in DOSBox-X feature that prints to PostScript files no longer works, because Apple removed all support for PostScript files. The special DOSBox-X-Print versions posted on this page support printing and PDF-creation, using text, PostScript, or PCL output, and also support "printing" from DOS applications to the Windows or macOS clipboard.
The source code of the application itself is the same as standard DOSBox-X (03.01.2024 release), except, under Windows, an additional menu item listing printer port assignments, and, under macOS, one changed line of code that places the default macOS configuration file inside the app itself. Everything else provided by this version is included in a "resources" folder created with the app under Windows and inside the app under macOS. The source code is on GitHub and free for anyone to modify.
A list of printing assignments (LPT1 prints to the default host printer, etc.) is available from the system menu (under Windows) and the "About dosbox-x" menu on the Mac.
For Windows: Download the app and its related files in this zip archive, which contains SDL1 and SDL2 versions of the app. To decide which to use, consult the DOSBox-X website. Both are codesigned.
For macOS: Download the app in this zip archive, which contains SDL1 and SDL2 versions of the app. To decide which to use, consult the DOSBox-X website. Both are notarized "universal" (Intel and Apple Silicon) apps.
Under macOS, each user in a multi-user system should keep a separate copy of the app in the user's own folder. On a single-user system, the app can be kept either in the system-wide Applications folder or anywhere in the User folder.
Additional software used for printing: This project uses my builds of the open source gs and gpcl6 executables (both are provided by Ghostscript) and the nenscript executable. If you don't trust my builds, build the projects from the source on the linked pages and replace my builds with yours. The project uses nenscript to convert text to PostScript format, gpcl6 to convert PCL output to PostScript format, and gswin32c (for Windows) and gs (for macOS) to convert either the converted PostScript or PostScript printer out to a PDF file that can be printed by macOS. See the links to source code, elesewhere on this page.
Under Windows, the project also uses, by default, the copyrighted but free-for-personal-use PDF-Xchange program for printing PDF files and an open-source program built by me in the AutoIt scripting language, SelectPrinterForPDF.exe and SelectPrinterForRawFile.exe (the two are the same, except for their names). The AutoIt source code may be found in the resources folder together with the executables. The system also uses the open-source RawPrint.exe utility (found here). If you want to use only OS-native and fully open-source tools, get in touch with me for a slower and less reliable alternative, which briefly opens windows that I can't prevent from appearing; it may appease your puritanical conscience if it needs that kind of appeasement.
Under macOS, the project uses one closed-source program, Stefan Klieme's Bonjour Events (download), needed for detecting whether a printer is online. If you don't want to use a closed-source program, get in touch with me for a slower, more awkward alternative.
These assignments are accessible under Windows from the last menu item in the app's system menu (upper-left-corner of the window) and under macOS from the "About dosbox-x" menu.
Important: LPT4 and higher numbers are not standard DOS ports, so LPT4, etc., must be specfied as a filename for printer output from a DOS application.
Source code for the fully open-source software used in this project may be found here:
Edward Mendelson (edward [dot] mendelson [at] columbia [dot] edu)