Setting Print Options
Setting Print Options
Page setup options are fully supported in Aspose.Diagram. This article explains how to set page options with Aspose.Diagram and shows code samples for setting:
Aspose.Diagram provides a class, Page, that represents a Microsoft Visio file. The Diagram class contains a Pages collection that allows access to each page in the Visio file. A page is represented by the Page class.
The PageSheet class provides the PrintProps property that is used to set the page setup options of the page. In fact, this PrintProps property is an object of the PageSheet class used to set different page layout options for a printed page. The PrintProps class provides various properties used to set page setup options. Some of these properties are discussed below.
Print Page Orientation
Print Page orientation can be set to portrait or landscape using the PrintProps class' PrintPageOrientation property. The PrintPageOrientation property accepts one of the pre-defined values in the PrintPageOrientationValue enumeration, listed below.
Print Page Orientation Types | Description |
---|---|
SameAsPrinter | Same As Printer orientation |
Landscape | Landscape orientation |
Portrait | Portrait orientation |
Scaling Factor
It is possible to reduce or enlarge a page’s size by adjusting the scaling factor with the ScaleX property.