Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 addViewerPreference 方法将打印纸张尺寸预设为 Legal?文档的纸张尺寸是自定义的 (8.5" x 12")。我不想更改它,因为它是从某个模板派生的。
但是,我想将打印纸张尺寸预设为合法。
有什么方法可以使用 addViewerPreference 方法来实现吗?
也许是这样的:
writer.addViewerPreference(PdfName.SIZE, *LEGAL*)