Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetOrientation

Changes the orientation of the page.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetOrientation"; PDF; Value )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Value The new roatation value. From -360 to 360 in 90 degree steps. 90

Result

Returns OK or error message.

Description

Changes the orientation of the page.
The function sets the orientation of a page. The parameter Value must be a multiple of 90 or 0. Positive values rotate the page clockwise, negative counter counter clockwise.
Note that the page will be rotated entirely incl. all objects. The width and height of the page are left unchanged, including the coordinates. Creating landscape paper formats require further such as changing the coordinate system. This can be done with DynaPDF.SetOrientationEx. Another way to create a landscape paper format is to change the bounding box of the page, see DynaPDF.SetBBox.

Default is 0.

See also DynaPDF.SetOrientationEx.

See also SetOrientation function in DynaPDF manual.

Examples

Create landscape picture with orientation:

# Add page
Set Variable [ $r ; Value: MBS("DynaPDF.AppendPage"; $pdf) ]
# Rotate page 90°
Set Variable [ $r ; Value: MBS("DynaPDF.SetOrientation"; $pdf; 90) ]
# draw something...
#
# End page
Set Variable [ $r ; Value: MBS("DynaPDF.EndPage"; $pdf) ]

See also

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 3th January 2021


DynaPDF.SetOpacity - DynaPDF.SetOrientationEx