|
Post by frank on Jul 30, 2019 10:33:29 GMT 1
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.
Attachments:
|
|
|
Post by Jos on Jul 30, 2019 11:20:42 GMT 1
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
(Select the default printer, send data as-is).
Jos
|
|
|
Post by frank on Jul 30, 2019 15:31:39 GMT 1
Thanks. Unfortunately, this addition doesn't make any difference.
However, I found two new files in the map C:\vDos\: #LPT1.asc and #LPT1.tzt. Both files contain plain text and contain the text to be printed, preceeded by E&k2G&l1L(10U)10U&l26A
and succeeded by E%-12345X@PJL RESET %-12345X The difference between the files is the presentation of diacritical letters, for example ñ in the asc-file, and ± (correct) in the txt-file.
|
|
|
Post by Jos on Jul 30, 2019 16:23:59 GMT 1
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"
Jos
|
|
|
Post by frank on Jul 31, 2019 6:20:33 GMT 1
Thanks Jos.
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.
|
|
|
Post by alex on Oct 31, 2022 12:07:59 GMT 1
the "LPT1 = SEL:"" RAW" #fix worked, for me, as a charm ! thank you ..
|
|