hir0ku
hir0ku

Reputation: 185

How to set paper size of B4 paper (Format not found in PrintSetup) in Apache POI?

I understand setting paper size of JIS size B4 paper in Apache POI. PrintSetup class has JIS size B4 property.( https://poi.apache.org/apidocs/5.0/org/apache/poi/ss/usermodel/PrintSetup.html ) But ISO size B4 not listed.

I want to set paper size of ISO size B4 paper in Apache POI.

how do that?


Reference https://mojoprint.jp/guide/international-paper-sizes.php

I'm sorry for the confusion, I think the B4 JIS standard size in PrintSetup is actually ISO standard B4 size. In the question, I'm using the Javadoc representation of the Apache POI.

Upvotes: 0

Views: 241

Answers (1)

Axel Richter
Axel Richter

Reputation: 61945

Apache POI's paper sizes, for example PrintSetup.B4_PAPERSIZE = 12, corresponds to XlPaperSize enumeration (Excel) where you find:

Name            Value      Description
xlPaperB4       12         B4 (250 mm x 354 mm)

And that is exactly ISO 216 B4 size.

JIS size of B4 would be 257 mm × 364 mm. But that is not available in Excel. So the text in Apache POI's javadoc is wrong.

Upvotes: 2

Related Questions