因此,我有下面的代碼,當對話框打開時,它顯示打印機設置已更改爲雙面打印,但當我單擊確定並打印時,它不會打印雙面,但是當我手動選擇雙它確實打印正確。任何想法可能是這種情況?在此先感謝您的幫助。 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