First post, by emendelson
With apologies to Qbix, who wrote that something like this would mislead people into thinking that DOSBox was for applications, not only for games:
Here is a kludgy, unofficial, unsupported, and probably very buggy system for printing from DOSBox to the current Windows printer. It supports DOS games that can output PCL, PostScript, or ASCII text to a printer - provided that those games can "print to a file." It also makes it possible to "print" PDF files from DOSBox. It doesn't matter if your Windows printer supports PCL or PostScript - this system takes PCL or PostScript output, and converts it so that it prints to any Windows printer, including primitive GDI printers.
Also, this system makes it possible to send text to the Windows clipboard and receive text from the Windows clipboard.
To use it, place the contents of the linked ZIP file into the same directory with your copy of DOSBox.exe. The contents of the ZIP file are: the DOSBoxPrinter.exe executable and two folders (PrintApps and PrintOut).
Optional: create a shortcut to DOSBoxPrinter.exe in which you add to DOSBoxPrinter.exe the same command-line parameters that you use when launching DOSBox.
Run DOSBoxPrinter.exe. It will launch the copy of DOSBox.exe in the same directory, with the no-console switch, and DOSBox will mount as drive P: the PrintOut folder that you copied from the ZIP file. If you add any command-line parameters to DOSBoxPrinter.exe, the same command-line parameters will be used when the DOSBoxPrinter program launches DOSBox.exe. The DOSBoxPrinter.exe program will continue running until you exit DOSBox. If you want to quit it at any time, right-click on the gray icon that appears in the taskbar tray while the program is running.
To print from a DOS game that supports PCL output, set the output print file in the game to "P:\OUTPUT.PCL".
To print from a DOS game that supports PostScript output, set the output print file in the game to "P:\OUTPUT.PS".
To print from a DOS game that only prints ASCII output, set the output print file in the game to "P:\OUTPUT.TMP" (notice: TMP, not TXT). If your game (like EDIT.COM) only supports LPT1, etc., but lets you enter a four-character port name, then try P:\@ instead of LPT1.
To create a PDF file instead of printing, change the output file name to PCLTOPDF.PCL, PSTOPDF.PS, or TXTTOPDF.TMP (depending on the kind of output your game supports). The PDF file will be created in a folder on your desktop named PDF, and will have an arbitrary name based on the current date and time. The PDF folder will be created if needed. (If your game, like EDIT.COM, only supports LPT1 etc., but lets you enter a four-character port name, then try P:\# instead of LPT1.)
To give the PDF output files a filename that includes the name of the game from which you created them, enter this command before running the game:
echo Name of My Game>p:\app-id.fil
The output PDF file will have a filename that looks like "Name of My Game 20120630124567.pdf". Delete p:\app-id.fil or replace it before running a different game.
When printing or creating a PDF file from ASCII output, the program tries to guess whether you are in North America (in which case it prints or creates a PDF with the letter page size) or elsewhere (in which case it prints or creates a PDF in the A4 page size). If it gets this wrong, please let me know. (When creating a PDF file from PostScript or PCL output, the program creates a PDF file with the page size specified in the DOS game.)
To send plain ASCII text to the Windows clipboard, copy to a file named P:\CLIPOUT.TMP. The contents of the file will be transferred to the Windows clipboard and the CLIPOUT.TMP file itself will be deleted.
If you use upper-ASCII characters (accented letters, etc), and you are in North America, use this filename instead: P:\CLIP437.TMP. If you are in Europe or any other region where the DOS codepage is 850, then use P:\CLIP850.TMP.
EDIT: For a memory-resident program that you can use to capture part or all of the screen so that it can be sent to the Windows clipboard (by being written to one of the three CLIP???.TMP filenames listed above) see a later post in this thread: Printing & clipboard-exchange - kludgy workaround for DOSBox under Windows
To get the contents of the Windows clipboard into DOSBox, either (1) run 4DOS and then run the 4DOS batch file P:\GETCLIP.BTM or (2) perform the following actions:
echo .>p:\getclip.tmp
[wait a second or two]
p:
rescan
type p:\clip.txt
EDIT: Or, in the current version of the program, simply press the {PAUSE} key on the keyboard to type the contents of the Windows clipboard into DOSBox at the current cursor location.
The program tries to handle upper-ASCII (accented etc.) characters correctly. If this fails, please let me know.
To view the name of the current default Windows printer, either (1) run 4DOS and then run the 4DOS batch file P:\WHICHPTR.BTM or (2) perform the following actions:
echo .>p:\whichptr.tmp
[wait a second or two]
p:
rescan
type p:\defptr.txt
del p:\defptr.txt
This system comes with no support of any kind, but I'll try to fix any bugs that get reported here.
The download is here: