By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,525 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

printing problem with dotmatrix printer using vb.net

P: n/a
Hi,
I am trying to print a invoice form with data from dataset using vb.net

and printer is dot matrix. Invoice is a continues paper with
pre-printed headers like First Name, Last Name, SSN# etc. and after
each header their are some blank block like for SSN# 9 small box. I hv
to print each digit in seprate box. When I tried using following code
it print 1st and 2nd digit on correct place but for the next one goes
between two box
ColPosX = 100
RowPosY = 100
ev.Graphics.DrawString(line, printFont, Brushes.Black, ColPosX,
RowPosY, New stringFormat)

I tried to change the ColPosX and RowPosY for digits but for first 2 or

3 digit it print on correct place then rest in b/w the boxs
Can any one help me to do this..
I hv to print complete form/invoice page in box.
Is there any other way to do this...
Waiting..
Thanks
Sk

Feb 16 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
su*********@gmail.com wrote:
Hi,
I am trying to print a invoice form with data from dataset using vb.net

and printer is dot matrix. Invoice is a continues paper with
pre-printed headers like First Name, Last Name, SSN# etc. and after
each header their are some blank block like for SSN# 9 small box. I hv
to print each digit in seprate box. When I tried using following code
it print 1st and 2nd digit on correct place but for the next one goes
between two box
ColPosX = 100
RowPosY = 100
ev.Graphics.DrawString(line, printFont, Brushes.Black, ColPosX,
RowPosY, New stringFormat)

I tried to change the ColPosX and RowPosY for digits but for first 2 or

3 digit it print on correct place then rest in b/w the boxs
Can any one help me to do this..
I hv to print complete form/invoice page in box.
Is there any other way to do this...
Waiting..
Thanks
Sk


What is your print font? That may cause you problems. How do you have
the printer installed on the computer? You may want to try and do raw
printing to the printer, I had success with my reciept printer that way.

Chris
Feb 16 '06 #2

P: n/a
<su*********@gmail.com> schrieb:
I am trying to print a invoice form with data from dataset using vb.net

and printer is dot matrix.


Depending on the printer you may find the article below useful:

HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;322090>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Feb 16 '06 #3

P: n/a
Hi Chris,
Thanks for reply....I am using Arial and and I tried differnt size like
7, 10...
Can you give me some sample of code...its urgent for me...and you are
the only one who said I had done...
please
Waiting...
Sk

Feb 17 '06 #4

P: n/a
forget to add..I am using USB port for connecting to printer..

Feb 17 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.