NT,2000,XP,2003....下不能用DefaultPageSettings.PaperSize = new PaperSize("Custom", 826, 492)这种方式定义纸张大小,Win98可以。

你需要在服务器属性中添加自定义表单,然后用

C# code
foreach (PaperSize paperSize in printDoc.PrinterSettings.PaperSizes)
{
 
    if (paperSize.PaperName =="自定义表单名称"&& paperSize.Height == width && paperSize.Height == height)         {
printDoc.DefaultPageSettings.PaperSize = paperSize; break;
    }
 
}

这种方式来设置自定义纸张

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-01-14
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-12
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
相关资源
相似解决方案