因此,我有下面的代码,当对话框打开时,它显示打印机设置已更改为双面打印,但当我单击确定并打印时,它不会打印双面,但是当我手动选择双它确实打印正确。任何想法可能是这种情况?在此先感谢您的帮助。 ASP.NET WEB应用程序更改打印机设置
using (PrintDialog pd = new PrintDialog())
{
PrinterSettings ps = new PrinterSettings();
ps.Duplex = Duplex.Horizontal;
pd.PrinterSettings = ps;
// pd.UseEXDialog = true;
if (pd.ShowDialog() == DialogResult.OK)
{
ProcessStartInfo info = new ProcessStartInfo(filePath);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);
}
}
只是为了确认它是一个Web应用程序。如果这是一个Web应用程序,我不确定您是否可以设置打印机设置。因为你的代码在服务器上运行,但客户端系统在其他地方。因此覆盖客户端偏好可能是不可能的。但我不确定这一点。可能有某种方法。 – Narendra