在C#中设置打印机纸张大小

using System.Drawing.Printing.PrintDocument

using System.Drawing.Printing.PrinterSettings.PaperSizeCollection

using System.Drawing.Printing.PaperSize

using System.Drawing.Printing.PageSettings

/////////需要以上引用

PrintDocument pd = new PrintDocument();
PaperSize p=null;
foreach(PaperSize ps in pd.PrinterSettings.PaperSizes)
{ if(ps.PaperName.Equals("A3"))
p = ps;
}
pd.DefaultPageSettings.PaperSize = p;
pd.Print();
上一篇:python3笔记(一)初识Python


下一篇:Cocos Creator(圆形遮罩头像)动态增加遮盖层 mask 并设为圆形生效