Hi Expert!
How to print HTML document using command line and C#.
Thanks in advance
Total Post:4
Points:28Hi Expert!
How to print HTML document using command line and C#.
Thanks in advance
Post:1
Points:7I have tried with the above code but it will ask to Click the Print button through dialog box.
using (Process printProcess = new Process())
{
string systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System);
printProcess.StartInfo.FileName = systemPath + @"\rundll32.exe";
printProcess.StartInfo.Arguments = systemPath + @"\mshtml.dll,PrintHTML """ + document + @"""";
printProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
printProcess.Start();
}
© Copyright © 2010 - 2019 MindStick Software Pvt. Ltd. All Rights Reserved
Post:604
Points:4228Re: How do I print an HTML document from a web service?
Hi Alexander Sabato!
Run this command into command prompt
rundll32.exe %WINDIR%\System32\mshtml.dll,PrintHTML "FilePath"
If you are using C#, than used line of code as below
Note: Here "FilePath", represent path of document which you want to print.