Click here to Skip to main content
16,004,969 members
Please Sign up or sign in to vote.
1.67/5 (2 votes)
See more:
how to print on a custom papersize in c# using dotmatrix printer. I m printing record from a table using c#. the papersize should be set by the user. it's too urgent pls help me.
thanx in advance.
kindly mail ur answer at saurabh.india009@gmail.com or call me at (+91)9852932254
Posted
Updated 23-Feb-10 1:14am
v3

1 solution

9852932254 wrote:
kindly mail ur answer at [email address] or call me at [phone number]


Wow - that's amazing. So as well as email spam, you want phone spam ? Brilliant.


9852932254 wrote:
it's too urgent pls help me.


it's not a good business plan to rely on the last minute kindness of strangers. Perhaps you should have planned better, or only taken a job you knew how to do ?

I googled ( something else you should learn to do ) and found this:"

Hi Ashu,
After spending considerable time searching on the same topic, I came across a code snippet posted by a guy somewhere. He claims that the code snippet could get the job done. Since I have no dot-matrix printer in place, I couldnt get my hands wet with it. Here is the snippet:
' Pass the File Name

Sub Prnt_2_Port(FName As String)
Open FName For Input As #1
'Since the Printer might be connected to LPT1 or LPT2 it
'had been changed to Printer.Port - KSM (21/11/2002)
'On Error GoTo To_NPrint
Open Printer.Port For Output As #2
StrToPrint = ""
While Not EOF(1)
Line Input #1, StrToPrint
If Right(StrToPrnt, 1) = " " Then StrToPrnt = Mid(StrToPrnt, 1, Len(StrToPrnt) - 1)
Print #2, StrToPrint
Wend
Close #2
Close #1
Exit Sub


Try it out and let me know how it went. Good luck!!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900