My default printer is a 'HP LaserJet 400 M401 PCL 6' network printer. Printing from my (Dutch) DOS program to this printer seems OK, see the first attachment. However, after clicking on the OK button, the window 'Could not initialize printer' is displayed, see the second attachment. What can I do to solve this problem?
I apologize if this problem is not new and I overlooked it on the forum.
Doesn’t ring a bell. Mostly “Could not initialize printer” is caused by selecting/setting an incorrect printer name in config.txt. But you select it from the drop down list. Your printer would work in other Windows application. I suppose your program sends PCL data to the printer. What f you add this line to config.txt: LPT1 = SEL:"" RAW
You shouldn’t get the printer selection dialog anymore, while the RAW option is far less demanding since the ASCII data stream basically bypasses the printer driver.
The #LPT1.asc and #LPT1.txt files are not used by vDos, they are solely created to accommodate external (print)programs. #LPT1.asc contains the ASCII data, so it needs the correct codepage selected to display the upper 128 characters properly. #LPT1.txt contains the same data, but translated to Unicode, so no codepage applies.
Make sure you added LPT1 = SEL:"" RAW to (the correct) config.txt file, eventually test by changing RAW to for instance RAWW, that should produce a vDos error while loading.
If it isn’t that, either: Install some HP LaserJet driver of Microsoft, or If LPT1 is redirected (NET USE ...) to the laserjet, add to config.txt: LPT1="%windir%\system32\print.exe" /D:LPT1 #LPT1.asc"
I'am very sorry. Your solution to add the line LPT1 = SEL:"" RAW worked fine. I didn't read correctly and added it to the autoexec file. After adding it to the config file printing is OK. Once again: very sorry, my fault.