Printing to an old dot matrix tractor feed printer

This forum is for eXpress++ general support.
Message
Author
Jean
Posts: 13
Joined: Tue Jan 07, 2014 9:51 am

Printing to an old dot matrix tractor feed printer

#1 Post 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
Last edited by Jean on Wed Jan 08, 2014 9:03 am, edited 1 time in total.

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to an old dot matrix tractor feed printer

#2 Post by rdonnay »

Have you tried decreasing the font size?

Show me some of your code.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Printing to an old dot matrix tractor feed printer

#3 Post 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.
Best regards,

Chris.
www.aboservice.be

Jean
Posts: 13
Joined: Tue Jan 07, 2014 9:51 am

Re: Printing to an old dot matrix tractor feed printer

#4 Post 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.

Jean
Posts: 13
Joined: Tue Jan 07, 2014 9:51 am

Re: Printing to an old dot matrix tractor feed printer

#5 Post by Jean »

After posting all this I think I can tweak it till it works.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Printing to an old dot matrix tractor feed printer

#6 Post 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.
Klaus

messaoudlazhar
Posts: 42
Joined: Mon Dec 23, 2013 2:10 pm
Contact:

Re: Printing to an old dot matrix tractor feed printer

#7 Post 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

reganc
Posts: 258
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Printing to an old dot matrix tractor feed printer

#8 Post 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.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

User avatar
rdonnay
Site Admin
Posts: 4734
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Printing to an old dot matrix tractor feed printer

#9 Post by rdonnay »

Jean -

Do you get the same result when printing to a non-tractor printer?
The eXpress train is coming - and it has more cars.

Jean
Posts: 13
Joined: Tue Jan 07, 2014 9:51 am

Re: Printing to an old dot matrix tractor feed printer

#10 Post 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

Post Reply