Printing from older DOS programs...
Moderator: Rathinagiri
Printing from older DOS programs...
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!!!
- Attachments
-
- moldruk.zip
- (3.6 KiB) Downloaded 847 times
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Printing from older DOS programs...
Hi Marekmol wrote: ...
Maybe it will be useful for somebody.
...
I will try to help if somebody finds my program useful.
...
Thanks for sharing
This is the bad newsPS. I don't have a time to translate all comments and variable names to English.
Regards
--
esgici
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Printing from older DOS programs...
Thanks a lot.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Printing from older DOS programs...
esgici wrote:Hi Marekmol wrote: ...
Maybe it will be useful for somebody.
...
I will try to help if somebody finds my program useful.
...
Thanks for sharing
This is the bad newsPS. I don't have a time to translate all comments and variable names to English.
Regards
--
esgici
First weeeks of year are full of stupid work for me.
If I have few time, I'll translate everything to English.
Re: Printing from older DOS programs...
I think my first post was chaotic. So I will write how to print from your clipper program:
cBoldOnCommand := chr(27) +"2"
cBoldOffCommand := chr(27)+"3"
eol := chr(13) + chr(10)
set printer to "FileTopPrint.prn"
set device to print
@ prow(),pcol() say cBoldOnCommand + "This is bold text" + cBoldOffCommand +eol
eject
set device to screen
set printer to
run MolDruk.exe FileToPrint.prn
Re: Printing from older DOS programs...
Translated by Google,
I've taken a look at this post, because I have an old clipper program in operation, the issue is whether this program may work properly even in GDI printers / Windows only, because Unfortunately the client has this kind of printers that also have a USB port, so the question is whether it may work.
Thanks
Greetings
Javier
Spanish,
Le he echado un vistazo a este post, ya que tengo un viejo programa en clipper funcionando, el problema es si este programa podrá funcionar adecuadamente aún en impresoras GDI/solo windows, ya que por desfortuna el cliente cuenta con este tipo de impresoras, además de que tienen puerto USB, por ello la pregunta es, si es posible que funcione.
Gracias
Saludos
Javier
I've taken a look at this post, because I have an old clipper program in operation, the issue is whether this program may work properly even in GDI printers / Windows only, because Unfortunately the client has this kind of printers that also have a USB port, so the question is whether it may work.
Thanks
Greetings
Javier
Spanish,
Le he echado un vistazo a este post, ya que tengo un viejo programa en clipper funcionando, el problema es si este programa podrá funcionar adecuadamente aún en impresoras GDI/solo windows, ya que por desfortuna el cliente cuenta con este tipo de impresoras, además de que tienen puerto USB, por ello la pregunta es, si es posible que funcione.
Gracias
Saludos
Javier
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Printing from older DOS programs...
Fantastic one.
Thanks a lot Javier.
Thanks a lot Javier.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Printing from older DOS programs...
Of course, it works! I can post modified version of MOLDRUK>
One of my clients use this program to print to pdf orders from sale system (via PDFCreator... (I've changed... Marek).
If you are interesting, I will explain you how to use it.
Marek
One of my clients use this program to print to pdf orders from sale system (via PDFCreator... (I've changed... Marek).
If you are interesting, I will explain you how to use it.
Marek
Last edited by mol on Wed Apr 15, 2009 8:03 am, edited 1 time in total.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Printing from older DOS programs...
Definitely Marek. Please do that. It would be useful for my gridprint project too.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Printing from older DOS programs...
In this version you can set printer on which you want to print in moldruk.ini file
some thesaurus:
drukarka=printer - in this line you need to write full window's printer name
MaxDlStrony - Max Length of Page - max printeable length of page in millimetres
TytulDokumentu - Title of Document - print job name which appears in printer's window while printing
cpi - character per inch
cpi5 - wide (40 characters in line)
cpi10 normal,
etc.
some thesaurus:
drukarka=printer - in this line you need to write full window's printer name
MaxDlStrony - Max Length of Page - max printeable length of page in millimetres
TytulDokumentu - Title of Document - print job name which appears in printer's window while printing
cpi - character per inch
cpi5 - wide (40 characters in line)
cpi10 normal,
etc.
- Attachments
-
- moldruk_source.zip
- (12.96 KiB) Downloaded 716 times