I need to get paper size by System.Drawing.Printing.PaperKind. Are there any predefined values? I don\'t want to hardcode or calculate paper sizes, I just want to get it program
A LINQ way to achieve your goal is something like this:
PrinterSettings printerSettings = new PrinterSettings();
IQueryable paperSizes = printerSettings.PaperSizes.Cast().AsQueryable();
PaperSize a4rotated = paperSizes.Where(paperSize => paperSize.Kind == PaperKind.A4Rotated).FirstOrDefault();
Good luck!