0
Answer

Printer settings through C# coding

Photo of Prasad

Prasad

19y
2.2k
1

Hi,
    I am using the below code to print some content

ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = true;
psi.FileName = Application.StartupPath + "\\ActionPlan.html";
psi.Verb = "Print";
psi.WindowStyle = ProcessWindowStyle.Hidden;
System.Diagnostics.Process.Start(psi);

But the problem with this code is, it is printing the content with default printer settings.
My requirement is to print the content in A4 size layout.

How to do it in C#.Net coding.

Answers (0)