开发者

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

开发者 https://www.devze.com 2023-02-01 07:19 出处:网络
I have to print a text file created usingCrystal 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

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

精彩评论

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