現時点では説明できない理由により、ドキュメントを印刷しようとしたときに Adobe Reader ウィンドウが開かないようにする必要があります。私の前にこれに取り組んでいた開発者は、次のフラグを設定していますが、それらが何のためにあるのかはよくわかりません-
if (RegistryManager.GetAcrobatVersion() >= 9.0f)
printerArg = "\"" + printerName + "\"";
else
printerArg = printerName;
Process myProc = new Process();
myProc.StartInfo.FileName = fileName;
myProc.StartInfo.Verb = "printto";
myProc.StartInfo.UseShellExecute = true;
myProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProc.StartInfo.CreateNoWindow = true;
myProc.StartInfo.Arguments = "\"" + printerName + "\"";
bool result = myProc.Start();
if (myProc.WaitForInputIdle())
{
if (!myProc.HasExited)
{
myProc.WaitForExit(Convert.ToInt32(5000));
myProc.Kill();
}
}
myProc.Close();
どんな助けでも大歓迎です!
ありがとう、
テジャ。