I want to set my prnter's default paper size = A5
My code is
printDocument.DefaultPageSettings.PaperSize.RawKind = 11;
but this code does not work. Is there any other way? Please Help me.
I want to set my prnter's default paper size = A5
My code is
printDocument.DefaultPageSettings.PaperSize.RawKind = 11;
but this code does not work. Is there any other way? Please Help me.
You cannot just blindly modify one property within the
PaperSizeobject and expect it will work. The documentation for thePaperSizeproperty reads:If the printer supports A5 paper size, you can check the
Kindproperty for aPaperKind.A5value to lookup the correct settings. Or, make yourself a customPaperKindinstance with the respective dimensions.