K
Kumar.A.P.P
We have a requirement in our project to print Html page from a vb.net windows
service application. The application should not display any dialog box. The
Printer details, which varies for different Print Jobs, needs to be
programmatically set. We have found the following code on the net which can be
used to print HTML page.
Dim p As New System.Diagnostics.ProcessStartInfo
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\tEMP\NewFolder\sparsh.html"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
The above code is printing the html file but the problem is that the printer
dialog box is displayed every time the page is printed.
Please suggest a way out where we can eliminate the Dialog Box? Any other
approach to print HTML page from .net application can also be take up.
service application. The application should not display any dialog box. The
Printer details, which varies for different Print Jobs, needs to be
programmatically set. We have found the following code on the net which can be
used to print HTML page.
Dim p As New System.Diagnostics.ProcessStartInfo
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\tEMP\NewFolder\sparsh.html"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
The above code is printing the html file but the problem is that the printer
dialog box is displayed every time the page is printed.
Please suggest a way out where we can eliminate the Dialog Box? Any other
approach to print HTML page from .net application can also be take up.