PrintTicket.PageMediaType Property

Gets or sets a value indicating what sort of paper or media the printer uses for the print job.

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

public Nullable<PageMediaType> PageMediaType { get; set; }
/** @property */
public Nullable<PageMediaType> get_PageMediaType ()

/** @property */
public void set_PageMediaType (Nullable<PageMediaType> value)

public function get PageMediaType () : Nullable<PageMediaType>

public function set PageMediaType (value : Nullable<PageMediaType>)

You cannot use this property in XAML.

Property Value

A PageMediaType value specifying the print media, such as card stock, label, plain, or photographic.

Exception typeCondition


Calling code has attempted to set the property to a value that is not in the PageMediaType enumeration.

A a null reference (Nothing in Visual Basic) value for this property means that this feature setting is not specified. Also, when the value is a null reference (Nothing in Visual Basic), the XML versions of the PrintTicket (see SaveTo and GetXmlStream) will not contain any markup for this feature.

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

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions