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.
Copyright © 2021 Jogjafile Inc.
You cannot just blindly modify one property within the
PaperSize
object and expect it will work. The documentation for thePaperSize
property reads:If the printer supports A5 paper size, you can check the
Kind
property for aPaperKind.A5
value to lookup the correct settings. Or, make yourself a customPaperKind
instance with the respective dimensions.