Skip to content
ComPDF
Guides

旋转页面

以下是旋转页面的示例代码:

java
document.pageAtIndex(0).setRotation(90); // 将第一页顺时针旋转90度。
kotlin
document.pageAtIndex(0).rotation = 90 // 将第一页顺时针旋转90度。

当文档已绑定并通过 CPDFReaderView 显示时,在对文档页面进行修改后,需要调用以下接口刷新视图,使变更立即生效:

java
cpdfReaderView.reloadPages();