如何在 Apache POI 中设置 B4 纸的纸张尺寸(在 PrintSetup 中找不到格式)?
How to set paper size of B4 paper (Format not found in PrintSetup) in Apache POI?
我了解在 Apache POI 中设置 JIS 尺寸 B4 纸张的纸张尺寸。
PrintSetup class 具有 JIS 尺寸 B4 属性。( https://poi.apache.org/apidocs/5.0/org/apache/poi/ss/usermodel/PrintSetup.html ) 但未列出 ISO 尺寸 B4。
我想在 Apache POI 中设置 ISO 大小 B4 纸张的纸张大小。
怎么做到的?
参考
https://mojoprint.jp/guide/international-paper-sizes.php
很抱歉让您感到困惑,
我认为 PrintSetup 中的 B4 JIS 标准尺寸实际上是 ISO 标准 B4 尺寸。在问题中,我使用的是 Apache POI 的 Javadoc 表示。
Apache POI 的纸张大小,例如 PrintSetup.B4_PAPERSIZE = 12, corresponds to XlPaperSize enumeration (Excel) 您在其中找到:
Name Value Description
xlPaperB4 12 B4 (250 mm x 354 mm)
这正是 ISO 216 B4 尺寸。
B4 的 JIS 尺寸为 257 mm × 364 mm。但这在 Excel 中不可用。所以 Apache POI 的 javadoc 中的文本是错误的。
我了解在 Apache POI 中设置 JIS 尺寸 B4 纸张的纸张尺寸。 PrintSetup class 具有 JIS 尺寸 B4 属性。( https://poi.apache.org/apidocs/5.0/org/apache/poi/ss/usermodel/PrintSetup.html ) 但未列出 ISO 尺寸 B4。
我想在 Apache POI 中设置 ISO 大小 B4 纸张的纸张大小。
怎么做到的?
参考 https://mojoprint.jp/guide/international-paper-sizes.php
很抱歉让您感到困惑, 我认为 PrintSetup 中的 B4 JIS 标准尺寸实际上是 ISO 标准 B4 尺寸。在问题中,我使用的是 Apache POI 的 Javadoc 表示。
Apache POI 的纸张大小,例如 PrintSetup.B4_PAPERSIZE = 12, corresponds to XlPaperSize enumeration (Excel) 您在其中找到:
Name Value Description xlPaperB4 12 B4 (250 mm x 354 mm)
这正是 ISO 216 B4 尺寸。
B4 的 JIS 尺寸为 257 mm × 364 mm。但这在 Excel 中不可用。所以 Apache POI 的 javadoc 中的文本是错误的。