How to set predefined page size as the default page size

958 Views Asked by At

I want to set A5 as my printer default paper size.

I tried following code But it won't work for me.

var paperSize = printDocument.PrinterSettings.PaperSizes.Cast<PaperSize>().FirstOrDefault(e => e.PaperName == "A5");
printDocument.PrinterSettings.DefaultPageSettings.PaperSize = paperSize;
0

There are 0 best solutions below