I am trying print pdf file from application to network printer it will take more than 7 minutes but the pdf file sent immediately to the printer queue and i also try to one manual print in the same server open the adobe and give one test print the document is printed with 2 minutes.not able to find why the latency is there?
private static async Task PrintPDFfilemethod(string strPath)
{
try
{
ProcessStartInfo processStartInfo = new ProcessStartInfo()
{
Verb = "printto",
FileName = printfilenamewithpath,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden
};
processStartInfo.Arguments = "\"" + printername + "\"";
Process process = new Process()
{
StartInfo = processStartInfo
};
process.Start();
Thread.Sleep(30000);
process.WaitForInputIdle();
Thread.Sleep(30000);
if (!process.CloseMainWindow())
process.Kill();
}
catch(Exception ex)
{
}
}