Example usage for org.apache.poi.ss.usermodel PrintSetup TABLOID_PAPERSIZE

List of usage examples for org.apache.poi.ss.usermodel PrintSetup TABLOID_PAPERSIZE

Introduction

In this page you can find the example usage for org.apache.poi.ss.usermodel PrintSetup TABLOID_PAPERSIZE.

Prototype

short TABLOID_PAPERSIZE

To view the source code for org.apache.poi.ss.usermodel PrintSetup TABLOID_PAPERSIZE.

Click Source Link

Document

US Tabloid 11 x 17 in

Usage

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;/* w w w  .j ava2  s .c om*/
    } 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);
    }
}