跳到主要内容

GetRotation

获取页面旋转角度

语法

expression.GetRotation();

expression - 表示 ApiPage 类的变量。

参数

此方法没有任何参数。

返回值

number

示例

获取文档中第一页的旋转角度并在文本字段中显示。

// How to get the rotation for a page?

// Get the rotation and display the result in a PDF document.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 32]);
page.AddObject(textField);
textField.SetValue('Page rotate is: ' + page.GetRotation());