Bug 56509 - Page size "letter" as default
Summary: Page size "letter" as default
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.10-FINAL
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2014-05-09 10:17 UTC by guenther
Modified: 2014-05-15 10:15 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description guenther 2014-05-09 10:17:47 UTC
We discovered, that if not specifying explicitly any page size, by default each sheet's page size is set to HSSFPrintSetup.LETTER_PAPERSIZE.
Well this paper size is the most common type in North America, Bolivia, Colombia, Venezuela, the Philippines and Chile but the common page size in the the rest of the word is the ISO Standard A4.
Our users in Europe complain about always have to change the paper size on each sheet before going to print them.

Simply not predefine any default paper size in POI.
In this way the default page size of the selected printer get considered.
If inded a user wants a specific paper size, he always can set it explicitly by using PrintSetup#setPaperSize.
IMHO this would be the more reasonable approach.
Currently to reach this behavior we explicitly set the page size
to the undocumented PAPERSIZE value 0.

WORKAROUND: sheet.getPrintSetup().setPaperSize((short) 0);
Comment 1 Nick Burch 2014-05-15 10:15:04 UTC
Removing the current default would be a backwards incompatible change, so I can't see us doing so given there's an easy workaround

I've added a new constant of SYSTEM_DEFAULT_PAPERSIZE = 0 to hopefully make it easier for people to pick that if they want to, without breaking existing code