Skip to content

PDF 生成模板编辑器

开源可视化 PDF 生成引擎,支持自定义模板,并提供面向开发者的 API,灵活构建文档生成流程。

查看 GitHub

旋转页面 ​

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

javascript
// 将第一页顺时针旋转90度。
const pagesToRotate = [1];
const rotation = instance.Core.PageRotation.E_90; // E_90、E_180、E_270:顺时针旋转90、180、270度。
await documentViewer.getDocument().rotatePages(pagesToRotate, rotation);