We are currently developing a .net application for accounting. We are using an epson dfx-9000 dot matrix printer to do our printing for us. The printer is currently set to 6 lines to the inch, and if you do a self test print, it works. For some reason, when we use the driver from a windows 7 computer, all of our text that we send to the printer from the .net prints 7 lines to the inch. We have attempted to print both with and without the spooler, but no luck. Might this be a problem caused by windows or the .net framework which automatically formats the text?
Thomas,
Thomas
Loading

Suthish NairRank #92 · 22.8K reputationPosted Dec 1, 2010, 10:10 AM EST
Welcome to C# Corner.
Please check section Our recommended articles.
Still problems exists, please attach your code.
Thomas7 reputationPosted Dec 1, 2010, 10:26 AM EST
Suthish NairRank #92 · 22.8K reputationPosted Dec 1, 2010, 10:32 AM EST
Guest UserRank #1,422 · 1.2K reputationPosted Dec 1, 2010, 10:39 AM EST
1) Which version of .Net are you using?
2) Are you setting the paper size and other print/page settings in code? Do those settings match those in the printer driver properties?
Guest UserRank #1,422 · 1.2K reputationPosted Dec 1, 2010, 10:45 AM EST
http://stackoverflow.com/questions/2286839/reverse-line-feed-or-another-solution-for-continuous-feed-out-of-sync-matrix
Thomas7 reputationPosted Dec 1, 2010, 10:54 AM EST
2. We are not setting these things within the code, but instead are simply using the printer settings in the driver to change the paper size.
I have posted the code that we have created that uses the print document class. I hope it makes sense.
Suthish NairRank #92 · 22.8K reputationPosted Dec 1, 2010, 11:10 AM EST
Guest UserRank #1,422 · 1.2K reputationPosted Dec 1, 2010, 11:11 AM EST
Try setting the paper size and other settings explicitly in your code. The default values of the various PrintDocument properties may not match the settings in the printer driver properties. If you do that and still encounter the same issue, then you've (at the very least) eliminated the PrintDocument properties as the source of the problem.
Thomas7 reputationPosted Dec 1, 2010, 11:13 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Dec 2, 2010, 1:01 PM EST
Correct? Did you write the code? If so, then do you know why you did that? If not, can you consult with the author?
I apologize that I don't know the details of what size would result from that Font constructor, but it determines the size of the font.