开发者

PRINTING A TEXTFILE USING C# THRU LPT1 PORT and network printer for fastprinting

I have to print a text file created using Crystal Report import . now i Hve to print it directly to LPT1 port for fast dotmatrix printing . I used the below code, nothing is working . Any help would be greatly apprecialtable .

1.System.Diagnostics.Process.Start("Print", @"\D:LPT1" +" "+ txtFilepath);

  1. System.Diagnostics.Process printProcess = new System.Diagnostics.Process(); System.Diagnostics.ProcessStartInfo PrintStartInfo = new ystem.Diagnostics.ProcessStartInfo("Print.exe");

string STRARGS = txtFilepath + " " + "/D:LPT1"; PrintStartInfo.Arguments = STRARGS; printProcess.StartInfo = PrintStartInfo; printP开发者_JAVA百科rocess.Start();

printProcess.WaitForExit();

3.System.Diagnostics.Process.Start("Print", txtFilepath);

Please help me

Regards, Martin.


Check the below link. It will solve your problem.

How to Send Raw Data to Printer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜