Occurs immediately before each PrintDocument.PrintPage event.
It is possible to print each page of a document using different page settings. You set page settings by modifying individual properties of the QueryPageSettingsEventArgs.PageSettings property or by setting the property to a System.Drawing.Printing.PageSettings. Changes made to the System.Drawing.Printing.PageSettings affect only the current page, not the document's default page settings. The print job can also be canceled by setting the System.ComponentModel.CancelEventArgs.Cancel property to true for the System.Drawing.Printing.QueryPageSettingsEventArgs.
To associate the event with your event handler, add an instance of the System.Drawing.Printing.QueryPageSettingsEventHandler delegate to the event. The event handler is called whenever the event occurs. For more information about handling events with delegates, see [<topic://cpconEventsDelegates>].