This documentation is archived and is not being maintained.

PrintTicket::PageMediaSize Property

Gets or sets the page size for the paper (or other media) that a printer uses for a print job.

Namespace:  System.Printing
Assembly:  ReachFramework (in ReachFramework.dll)

public:
property PageMediaSize^ PageMediaSize {
	PageMediaSize^ get ();
	void set (PageMediaSize^ value);
}

Property Value

Type: System.Printing::PageMediaSize
A PageMediaSize object that represents the page size by using a name, dimensions, or both.

ExceptionCondition
ArgumentOutOfRangeException

Calling code has attempted to set the property with a PageMediaSize object that has at least one nullptr property.

- or -

Calling code has attempted to set the property with a PageMediaSize object whose PageMediaSizeName property is set to a value that is not in the PageMediaSizeName enumeration.

- or -

Calling code has attempted to set the property with a PageMediaSize object whose Width or Height property is set to a value less than 1.

This property corresponds to the Print Schema's PageMediaSize keyword.

You can test for the options that the printer supports by using the PageMediaSizeCapability property.

The following example shows how to use this property to scale a visual element to fit within the margins of the paper on which it is to print.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: