gpt4 book ai didi

java - 使用 pdfBox 的横向 PDF

转载 作者:搜寻专家 更新时间:2023-10-31 08:05:05 29 4
gpt4 key购买 nike

目前我正在使用 Apache 的 PDFBox 生成 pdf。它在纵向模式下工作得很好,但我的要求是第一两页应该是横向模式,然后所有其他页面都应该是纵向模式。

那么谁能帮助我如何在横向创建 pdf 并实现此功能?

注意:我无法从 PDFBox 切换到其他库

最佳答案

另一种解决方案是

PDPage page = new PDPage(new PDRectangle(PDRectangle.A4.getHeight(), PDRectangle.A4.getWidth()));

关于java - 使用 pdfBox 的横向 PDF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37550829/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com