You cannot just blindly modify one property within the PaperSize
object and expect it will work. The documentation for the PaperSize
property reads:
Set the PaperSize property for the page to a valid PaperSize, available through the PrinterSettings.PaperSizes collection.
If the printer supports A5 paper size, you can check the Kind
property for a PaperKind.A5
value to lookup the correct settings. Or, make yourself a custom PaperKind
instance with the respective dimensions.