This documentation is archived and is not being maintained.

PageSettings.PaperSize Property

Gets or sets the paper size for the page.

[Visual Basic]
Public Property PaperSize As PaperSize
public PaperSize PaperSize {get; set;}
public: __property PaperSize* get_PaperSize();
public: __property void set_PaperSize(PaperSize*);
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.


Exception Type Condition
InvalidPrinterException The printer named in the PrinterSettings.PrinterName property does not exist or there is no default printer installed.


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.


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