DevOrientation

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

DevOrientation

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by PHP and the Community Edition]

Returns / sets the orientation of the currently selected output device to portrait or landscape. Setting this property does NOT affect the setting of the preview (see PageOrientation).

property PageOrientation [integer] VPE.DevOrientation

read / write; runtime only

Possible Values:

ActiveX / VCL

Value

Enum

Comment

VORIENT_PORTRAIT

1

Portrait

 

VORIENT_LANDSCAPE

2

Landscape

 

Remarks:

The DevOrientation property is available for total control. It is only useful if called while processing the BeforePrintNewPage() event (VCL: OnPrintNewPage(), .NET: BeforePrintNewPage()). Otherwise the DevOrientation property is always overridden by the PageOrientation property. You should always use the PageOrientation property to change the orientation for the preview and the printer.

 

In case of an error, LastError is set to VERR_COMMON. An error may occur if the device does not support changing the orientation.

Example:

ActiveX / VCL

Doc.DevOrientation = VORIENT_LANDSCAPE

 

.NET

Doc.DevOrientation = PageOrientation.Landscape