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);
- 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
精彩评论