如何使用dotmatrix打印机在c#中的自定义纸张尺寸上进行打印.我正在使用c#从表中打印记录.纸张大小应基于表格的行数 [英] 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 based on the no.of rows of table

查看:108
本文介绍了如何使用dotmatrix打印机在c#中的自定义纸张尺寸上进行打印.我正在使用c#从表中打印记录.纸张大小应基于表格的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用dotmatrix打印机在c#中的自定义纸张尺寸上进行打印.我正在使用c#从表中打印记录.纸张尺寸应由用户设置.太紧急了,请帮助我.
提前谢谢.
请将您的答案发送至saurabh.india009@gmail.com,或致电(+91)9852932254

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

推荐答案

9852932254写道:
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写道:
9852932254 wrote:

它太紧急了,请帮助我.

it''s too urgent pls help me.



依靠陌生人的最后一刻不是一个好的商业计划.也许您应该计划得更好,或者只做一份您知道该怎么做的工作?

我在Google上搜索(您应该学习的其他方法),并发现了以下内容:"

阿舒,
在花了相当多的时间搜索同一主题之后,我遇到了某人在某个地方发布的代码段.他声称该代码段可以完成这项工作.由于我没有合适的点矩阵打印机,因此无法弄湿它.这是代码段:



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!!


这篇关于如何使用dotmatrix打印机在c#中的自定义纸张尺寸上进行打印.我正在使用c#从表中打印记录.纸张大小应基于表格的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆