For a class that includes the same information about the media size as PageMediaSize and also includes information about the imageable area of the page, see PrintDocumentImageableArea.

Caution

Classes within the System.Printing namespace are not supported for use within a Windows service or ASP.NET application or service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.