List of usage examples for org.apache.poi.ss.usermodel PrintSetup LEGAL_PAPERSIZE
short LEGAL_PAPERSIZE
To view the source code for org.apache.poi.ss.usermodel PrintSetup LEGAL_PAPERSIZE.
Click Source Link
From source file:ro.nextreports.engine.exporter.XlsExporter.java
License:Apache License
private void setPaperSize() { String pageFormat = bean.getReportLayout().getPageFormat(); short size = 0; if (ReportLayout.LETTER.equals(pageFormat)) { size = PrintSetup.LETTER_PAPERSIZE; } else if (ReportLayout.A3.equals(pageFormat)) { size = PrintSetup.A3_PAPERSIZE;//from www . j a va 2 s.c o m } else if (ReportLayout.A4.equals(pageFormat)) { size = PrintSetup.A4_PAPERSIZE; } else if (ReportLayout.LEGAL.equals(pageFormat)) { size = PrintSetup.LEGAL_PAPERSIZE; } else if (ReportLayout.LEDGER.equals(pageFormat)) { size = PrintSetup.LEDGER_PAPERSIZE; } else if (ReportLayout.TABLOID.equals(pageFormat)) { size = PrintSetup.TABLOID_PAPERSIZE; } if (size != 0) { xlsSheet.getPrintSetup().setPaperSize(size); } }