Printing Envelopes from C#

南笙酒味 提交于 2019-12-04 14:19:21

You can try to use this code to change the printDocument PaperSize , it works 100% :

for(int i=0;i<printDocument1.PrinterSettings.PaperSizes.Count; i++)
        { 
            //NASSIM LOUCHANI

            if(printDocument1.PrinterSettings.PaperSizes[i].RawKind == 11)
            {
                printDocument1.DefaultPageSettings.PaperSize = printDocument1.PrinterSettings.PaperSizes[i];
            }
        }

The number 11 is for A5 PaperKind , i think you can complete the rest .

Thank you .

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!