我有一個Windows應用程序,可直接將PDF打印到打印機。一切正常,但出於某種原因,每個PDF打印我看到PDF閱讀器Nitro Pro在後臺彈出然後關閉。直接打印PDF到打印機窗口
有沒有辦法避免窗口彈出。它似乎沒有影響過度應用程序,但只是一種討厭。
private void PrintDocument(string printer, string fileName)
{
ProcessStartInfo info = new ProcessStartInfo
{
Arguments = "\"" + printer + "\"",
Verb = "PrintTo",
FileName = fileName,
CreateNoWindow = true,
WindowStyle = ProcessWindowStyle.Hidden,
UseShellExecute = true
};
Process p = new Process { StartInfo = info };
p.Start();
p.WaitForExit(5000);
if (p.HasExited == false)
{
p.Kill();
}
}
卸載Nitro Pro? – LarsTech