Page 1 of 3

Printing from older DOS programs...

Posted: Fri Jan 09, 2009 9:46 am
by mol
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!!!

Re: Printing from older DOS programs...

Posted: Fri Jan 09, 2009 11:43 am
by esgici
mol wrote: ...
Maybe it will be useful for somebody.

...
I will try to help if somebody finds my program useful.
...
Hi Marek

Thanks for sharing :)
PS. I don't have a time to translate all comments and variable names to English.
This is the bad news :(

Regards

--

esgici

Re: Printing from older DOS programs...

Posted: Fri Jan 09, 2009 2:20 pm
by Rathinagiri
Thanks a lot. :)

Re: Printing from older DOS programs...

Posted: Fri Jan 09, 2009 7:40 pm
by mol
esgici wrote:
mol wrote: ...
Maybe it will be useful for somebody.

...
I will try to help if somebody finds my program useful.
...
Hi Marek

Thanks for sharing :)
PS. I don't have a time to translate all comments and variable names to English.
This is the bad news :(

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...

Posted: Tue Jan 13, 2009 6:30 am
by mol
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...

Posted: Wed Apr 15, 2009 4:15 am
by jparada
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

Re: Printing from older DOS programs...

Posted: Wed Apr 15, 2009 4:22 am
by Rathinagiri
Fantastic one. :)

Thanks a lot Javier.

Re: Printing from older DOS programs...

Posted: Wed Apr 15, 2009 6:17 am
by mol
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

Re: Printing from older DOS programs...

Posted: Wed Apr 15, 2009 6:47 am
by Rathinagiri
Definitely Marek. Please do that. It would be useful for my gridprint project too.

Re: Printing from older DOS programs...

Posted: Wed Apr 15, 2009 8:10 am
by mol
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.