PageSettings.PaperSize Property
Gets or sets the paper size for the page.
[Visual Basic] Public Property PaperSize As PaperSize [C#] public PaperSize PaperSize {get; set;} [C++] public: __property PaperSize* get_PaperSize(); public: __property void set_PaperSize(PaperSize*); [JScript] public function get PaperSize() : PaperSize; public function set PaperSize(PaperSize);
Property Value
A PaperSize that represents the size of the paper. Defaults to the printer's default paper size.
Exceptions
| Exception Type | Condition |
|---|---|
| InvalidPrinterException | The printer named in the PrinterSettings.PrinterName property does not exist or there is no default printer installed. |
Remarks
An instance of PaperSize represents the size of the paper through the PaperSize.Kind property, which contains one of the PaperKind values.
Set the PaperSize property for the page to a valid PaperSize, available through the PrinterSettings.PaperSizes collection.
See the PaperSize constructor to find out how you can specify a custom paper size.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
PageSettings Class | PageSettings Members | System.Drawing.Printing Namespace | PaperSize | PaperSize.Height | PaperSize.Kind | PaperSize.Width