VOGONS


Printing from DOSBox

Topic actions

First post, by Moguera

User metadata
Rank Newbie
Rank
Newbie

Some legacy DOS applications will run under Windows, others won't. 64 bit Windows won't run DOS applications at all. Users are increasingly investigating DOSBox as a solution to running their legacy DOS applications. However DOSBox was created for running DOS games and so has no printing support. Fortunately, there is a DOSBox "Megabuild" which does support printing.

PortTalk must be installed in order to print under Windows 2000 or XP, otherwise attempts to print will generate a Windows error. PortTalk is not required for Windows 9x. I have no idea if PortTalk will work under Vista or 7.

The default in the DOSBox .conf file for LPT1 is “parallel1=disabled”. One might think that “parallel1=printer” would be correct, but that didn't work for me. What did work was “parallel1=reallpt directlpt:378” for LPT1. This is for a local printer connected to LPT1 and the DOS program set to print to LPT1. Even my embedded HPPCL codes were seamlessly passed through to the printer. Below are the actual, relevant lines from my DOSBox .conf file:

[printer]
printer=true
dpi=360
width=85
height=110
##printoutput=png
printoutput=printer
##multipage=false
multipage=true
docpath=.
timeout=0

[parallel]
##parallel1=disabled
##parallel1=printer
parallel1=reallpt directlpt:378
parallel2=disabled
##parallel2=reallpt directlpt:BC00
parallel3=disabled

This should work for a printer connected to the LPT port integrated on the motherboard. It will not work with a PCI add-on parallel port card. Since the LPT port integrated on the motherboard appears to software as being on the ISA bus, an ISA add-on parallel port card.MAY work. However, the ISA bus was obsoleted long ago. The last time I searched, a few suppliers of industrial motherboards still offered new motherboards with ISA slots.

Windows 7 supports the LPT port integrated on the motherboard, but it otherwise will not support the ISA bus. An ISA card will be invisible to it.

Windows XP supports the ISA bus. Wouldn't it be nice if Microsoft were persuaded to keep offering it for legacy applications? Microsoft's CEO is Steve Ballmer if you care to contact him to lobby for it.

Links:
DOSBox Megabuilds
http://home.arcor.de/h-a-l-9000/
PortTalk
http://retired.beyondlogic.org/porttalk/porttalk.htm
Download: http://retired.beyondlogic.org/porttalk/porttalk22.zip

Reply 1 of 41, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

As I recall, PortTalk is 32-bit. There are some details about getting passthrough working with Windows 7 64-bit at Parallel port passthrough (Windows only) .

Moguera wrote:

One might think that “parallel1=printer” would be correct, but that didn't work for me.

That's because "printer" is for the virtual, emulated printer and not for parallel port passthrough to a real printer.

Moguera wrote:

It will not work with a PCI add-on parallel port card.

You've tested this yourself, have you?

Moguera wrote:

Below are the actual, relevant lines from my DOSBox .conf file:

If you're trying to be thorough, neither the commented "#" lines nor the [printer] section are relevant.

Reply 2 of 41, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

PortTalk must be installed in order to print under Windows 2000 or XP

"parallel1=file dev:lpt1" works for me in XP, no PortTalk required. Your mileage may vary.

Reply 3 of 41, by Moguera

User metadata
Rank Newbie
Rank
Newbie

"parallel1=file dev:lpt1" works for me in XP, no PortTalk required. Your mileage may vary.

ripsaw8080, I tried your suggestion on a Windows 7 computer. I didn't have time to install a DOS application, so I tried a simple "ECHO zap >LPT1 <Enter>". That printed to a printer connected to an on-board parallel port.

Encouraged by this success, I went back to my Windows 2000 computer and tried your suggestion again. Printing from a DOS application to on-board LPT1 succeeded. Printing to PCI LPT2 also succeeded. Yours is the preferred solution. Hats off to you!

Reply 4 of 41, by didi

User metadata
Rank Newbie
Rank
Newbie

I have the same problem. II have DOS BOS Megabuild, I started to use DOS application and there is a problem with printing. I have Win7 32-bit and I'm wondering why I can't print, I get the same config:

, and nothing happens..

[printer]
printer=true
dpi=360
width=85
height=110
##printoutput=png
printoutput=printer
##multipage=false
multipage=true
docpath=.
timeout=0

[parallel]
##parallel1=disabled
##parallel1=printer
parallel1=reallpt directlpt:378
parallel2=disabled
##parallel2=reallpt directlpt:BC00
parallel3=disabled

I have virtual printer and from dos box it doesn't work. So i started changing config but still nothig ;(

---
DIDI

Reply 5 of 41, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Did you try the line Mr. Ripsaw suggested?

Reply 6 of 41, by didi

User metadata
Rank Newbie
Rank
Newbie

Thank You! It works!

---
DIDI

Reply 7 of 41, by RoyGBiv

User metadata
Rank Newbie
Rank
Newbie

I am currently on WindowsXP and have a Rosewill PCI card with a parallel port set to LPT1 so I can print to a parallel printer. My wife uses an old DOS word processor (FirstChoice), and I am trying to get it to print through DOSBOX with the eventual goal of upgrading to Windows7 and using DOSBOX there.

I have tried both of the parallel port lines above in the DOSBOX conf file, but I can't get the program to print using either one.

The PCI card is set to LPT1, and the program is set to print to a printer on LPT1. I get the error message "printer not ready." Is there something else I can try in terms of configuring the card or the port? I originally had it set never to use an interrupt and then also tried always using an interrupt.

Do I need PortTalk? I have tried installing PortTalk, but I'm not sure if I did it correctly, and it did not seem to help.

BTW, I am able to open FirstChoice in DOS in WindowsXP, and it prints normally. Again, I am doing this so I can upgrade to Windws7.

Any assistance is greatly appreciated, especially if someone knows if this setup could be made to allow printing in Windows7.

SMK

Reply 8 of 41, by ws1978

User metadata
Rank Newbie
Rank
Newbie

Hi, do you know how to print from Mac OSX? I installed MB6 and changed the printeroutput=printer but there is no print dialog box coming out and also no response from the printer. It works well in Windows 7 64bit by just changing the printetoutput in the config file. Sincerely appreciate anyone advise, please. 😕

Reply 9 of 41, by mikel

User metadata
Rank Newbie
Rank
Newbie

All the tips refer to LPT1: but has anybody got any ideas how to make Dosbox print to a USB printer.

Reply 10 of 41, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

Is LPT1 real or emulated?

Klimawandel.

Reply 11 of 41, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
mikel wrote:

All the tips refer to LPT1: but has anybody got any ideas how to make Dosbox print to a USB printer.

As DOS programs cannot normally print to a USB printer, neither can DOSBox. You may want to try using the virtual printer instead. Alternatively, some people have posted about using DOSPRN instead.

Reply 12 of 41, by ImagineReason

User metadata
Rank Newbie
Rank
Newbie

Hi there,

here's what I did to print from DOSBox:

- Installed DOSBox Megabuild (D/L from http://home.arcor.de/h-a-l-9000)
- Settings in dosbox.conf:

[printer]
printer=true
dpi=360
width=85
height=110
printoutput=printer
multipage=false
docpath=.
timeout=1000

[parallel]
parallel1=printer

With these settings a window will pop up asking you to select a printer. Works without problems here (Windows 7 Pro x64).

Regards -- Markus

Reply 13 of 41, by Crashpc

User metadata
Rank Newbie
Rank
Newbie

Hello guys.

Just upgraded on Win7 64bit with new computers for small company, and have problems - old SW is 16Bit, so I use DosBox. I also need to print, but with no real success. I´ve installed the "printing compatible megabuild" DosBox, but still no success. These are my situations:

1) I can export a file into TXT, and take it with some "picker" waiting for file existence. So it take the file and print it immediately. This works, but not so nice for real usage of the SW. User must do much more to get the file printed, when he exports the file. This is just temporary solution.

2) I can link the DosBox LPT to the printer by mapping it in CMD (net use), I get some printing task to the printer, but the "file" is too small and nothing prints. HP printer is just idle, Samsung printer prints/deletes it after one second and nothing happens physically

3) If I set parralel1 to "printer", printing window appears, I can choose my printer, and send the task to it. Dosbox now starts to create many tasks for each page (result should be on one page), and it prints just one column of the text on each paper. Also mixed codepage problems as 4.

4) As 1 - I can make LPT1 print commant to export the file an pick it by printing SW which prints the file immediately, so it´s no differrence for user using the printing command, but I get bad letters (propably from bad codepage setting of the output), so it prints bad result.

Can anybody help me please to push or exploit one of those solutions to success?

Reply 15 of 41, by Crashpc

User metadata
Rank Newbie
Rank
Newbie

Yeah, I must have something extra every time. This is just a dream, and if you dream the same one, this is caused by Matrix…
There is missing just a little (codepage or unwanted letters on the output text file?) to have success with some solutions I posted.
I watched the link, I will try that in late evening (middle Europe), but I have no clue what is going on in that thread. I guess I´ll get it at the time of installation and config 😀.
Thanks anyway, will report my results.

Reply 16 of 41, by Crashpc

User metadata
Rank Newbie
Rank
Newbie

Back here. No success. Those instructions are not applicable on my situation and app. I can just run the DosBoxPrinter.exe and then I´m done. Can´t go further with instructions or I just don´t understand how to work with it.

Reply 17 of 41, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

If you want more help, you're going to have to give a lot more detail than that. What don't you understand? What sort of application are you trying to print from? What kind of printer support does the application have? Does the application have any kind of "print to file" support? What makes you think there's a "bad codepage setting", anyway?

Reply 18 of 41, by Crashpc

User metadata
Rank Newbie
Rank
Newbie

I am just unable to go with instructions. Not possible to make this in the application I use:

To print from a DOS game that supports PostScript output, set the output print file in the game to "P:\OUTPUT.PS".

Don´t have a game, and don´t have an app which can be set this way. Actually it can some way - I can export the file in the app anyway, so that way I don´t need to use more apps to do that as described. I´d like to fire the print button (LPT1) in the app and just print as I did in Windows XP....

Well. The application is for accounting. I need to print invoices, bills and so on. Printer support - don´t know. It just found basic printer in Win XP and printed to it. It is 16 bit dos-like app, so I guess it even has its own printing scripts, emulations and stuff like this for LPT output (printed with USB printers on Win XP without problem).I Can look for configs, ini/txt/cfg files of the software for details, but am not good programmer otherwise I would not be here.
The accounting app can print to a file, and when it does it, it does it well.
I can pick the file without user action and print it instantly. Only problem is, that classical printing a file was like "hit F6 then you are done" and print/export to a file is like "settings > export > to a file > path > name > export > hit enter" to get the job done. Unacceptable in real life for user.

Bad codepage setting thought is based on that our language uses special characters, which are crippled/changed for different letters or aliases in few parts of the file printed trough dosbox printing emulation or export. Once it(export to file) does the app itself, everything in the exported file is OK. Once I try to link LPT to a printer or a file in Win7, i get crippled output...

Reply 19 of 41, by Crashpc

User metadata
Rank Newbie
Rank
Newbie

Solved by "monkey" way. Found and installed winprint, applied right settings, and the app exports print command output also as a file, while also picks it and prints immediately. Very powerfull app for noobs indeed.
THX anyway, I know it is not easy with me 😀