Page 1 of 3

Printing to an old dot matrix tractor feed printer

Posted: Wed Jan 08, 2014 8:30 am
by Jean
I have small water program I wrote for a local company a long time ago. At that time they requested a DOS program so I did it as requested. Then I rewrote it in xbase/express for one other local company but they use a laser printer for all reports and billing card. Now the first one wants the newer windows version but they want to print to this tractor feed wide printer.

I am having issues trying to get the billing cards to print correctly. Has anyone done any programming to print to a tractor feed printer that I could ask questions from?

My issue is when I print it is way wider then I expect it to be. I was thinking it might be the font I was using so I changed it to Courier New but still it is printing way wider then it should.

Jean

Re: Printing to an old dot matrix tractor feed printer

Posted: Wed Jan 08, 2014 9:01 am
by rdonnay
Have you tried decreasing the font size?

Show me some of your code.

Re: Printing to an old dot matrix tractor feed printer

Posted: Wed Jan 08, 2014 9:59 am
by skiman
Hi,

Is there a good Windows driver for this printer installed? What happens if you print a simple document with Wordpad to that printer. Is it printed as expected? If not, your customer has to find a decent Windows driver.

Re: Printing to an old dot matrix tractor feed printer

Posted: Wed Jan 08, 2014 10:49 am
by Jean
When I print a report it expects to print to the whole width of the printer. But the billing card is 6" wide. Some of my code looked like this:

@ DC_PrinterRow()+1,16 DCPRINT SAY cBillingLastRanDateFONT cBillFont
@ DC_PrinterRow(),35 DCPRINT SAY cBillingLastRanDate FONT cBillFont

The second date was moved way over to the right. When I measure it the first date is 2.5 inches from the left and the second is 6 inches.

If I use a string like this I get it closer to what I want:

@ DC_PrinterRow()+1,1 DCPRINT SAY ' '+cBillingLastRanDate+' '+cBillingLastRanDate FONT cBillFont

The dates are a length of 10 each.

Re: Printing to an old dot matrix tractor feed printer

Posted: Wed Jan 08, 2014 11:46 am
by Jean
After posting all this I think I can tweak it till it works.

Re: Printing to an old dot matrix tractor feed printer

Posted: Thu Jan 09, 2014 12:05 am
by Koverhage
Jean,

you have 2 fast options.

1. user your old dos code with this http://bb.donnay-software.com/donnay/vi ... =942#p5106

2. You cahnge the code to dcprint say and use

DCPRINT OPTIONS TO aOptions;
FORMSIZE nFormsize

The best way is option 1, because windows printing on a dot matrix printer is very slow and you can 99% of your code.

Re: Printing to an old dot matrix tractor feed printer

Posted: Thu Jan 09, 2014 2:01 am
by messaoudlazhar
- Create a new form with the required dimensions from the print server properties
- use the form created : DCPRINT ON TO ... FORMSIZE <form>

Best Regards

Re: Printing to an old dot matrix tractor feed printer

Posted: Thu Jan 09, 2014 2:21 am
by reganc
Koverhage wrote:Jean,

you have 2 fast options.

1. user your old dos code with this http://bb.donnay-software.com/donnay/vi ... =942#p5106

2. You cahnge the code to dcprint say and use

DCPRINT OPTIONS TO aOptions;
FORMSIZE nFormsize

The best way is option 1, because windows printing on a dot matrix printer is very slow and you can 99% of your code.
I agree with Klaus that option 1, reusing your old dos printing code, is the easiest option. You can always rewrite it later, at your leisure, if needed.

You have still not shown how you are printing to it at the moment but I presume you are using DCPRINT. Once you have to deal with formsizes and fonts things get more complicated.

Re: Printing to an old dot matrix tractor feed printer

Posted: Thu Jan 09, 2014 9:45 am
by rdonnay
Jean -

Do you get the same result when printing to a non-tractor printer?

Re: Printing to an old dot matrix tractor feed printer

Posted: Thu Jan 09, 2014 12:01 pm
by Jean
Yes I am using DCPRINT. I have been interrupted way to much today and have not had any time to work on this again.

As the old water program is a dos app is it possible to get it to run on the new windows?

Jean