Printing from older DOS programs...
Posted: Fri Jan 09, 2009 9:46 am
I have a few big projects written for DOS and printers connected via LPT.
Now it's big problem - most of printers are connected via USB (I used network mapping for LPT - and it worked), but what to do with printers, which don't have built in PCL language?
I wrote a program, which translates file with printer steering commands for document printable on every windows printer.
In my dos programs I can define printer commands, which turn on/off bold, italic, 10cpi, 12cpi, 17cpi, 20cpi.
For simplicity:
ESC "2" turn on bold
ESC "3" turn off bold
ESC "4" turn on italic
ESC "5" turn off italic
ESC "6" turn on 5cpi
ESC "7" turn on 10cpi
ESC "8" turn on 12cpi
ESC "9" turn on 17cpi
ESC "A" turn on 20cpi
Now, I can print my document/report to file and then run my MOLDruk.Exe to print it on default window printer.
Program translates also native polish characters from CP852 to windows characters...
Program prints also convert graphical characters of frames to lines.
Document printed in this way on windows printer looks familiar to document printed on old dos compatible laser printer.
Maybe it will be useful for somebody.
PS. I don't have a time to translate all comments and variable names to English, but I think that program is written so clear.
I will try to help if somebody finds my program useful.
for example, I put pattern.prn - try do print it using:
MOLDruk pattern.prn
HAPPY TESTING!!!
Now it's big problem - most of printers are connected via USB (I used network mapping for LPT - and it worked), but what to do with printers, which don't have built in PCL language?
I wrote a program, which translates file with printer steering commands for document printable on every windows printer.
In my dos programs I can define printer commands, which turn on/off bold, italic, 10cpi, 12cpi, 17cpi, 20cpi.
For simplicity:
ESC "2" turn on bold
ESC "3" turn off bold
ESC "4" turn on italic
ESC "5" turn off italic
ESC "6" turn on 5cpi
ESC "7" turn on 10cpi
ESC "8" turn on 12cpi
ESC "9" turn on 17cpi
ESC "A" turn on 20cpi
Now, I can print my document/report to file and then run my MOLDruk.Exe to print it on default window printer.
Program translates also native polish characters from CP852 to windows characters...
Program prints also convert graphical characters of frames to lines.
Document printed in this way on windows printer looks familiar to document printed on old dos compatible laser printer.
Maybe it will be useful for somebody.
PS. I don't have a time to translate all comments and variable names to English, but I think that program is written so clear.
I will try to help if somebody finds my program useful.
for example, I put pattern.prn - try do print it using:
MOLDruk pattern.prn
HAPPY TESTING!!!