List of usage examples for org.apache.poi.ss.usermodel PrintSetup LETTER_PAPERSIZE
short LETTER_PAPERSIZE
To view the source code for org.apache.poi.ss.usermodel PrintSetup LETTER_PAPERSIZE.
Click Source Link
From source file:jdbreport.model.io.xls.poi.Excel2003Writer.java
License:Apache License
private short convertPaperSize(PaperSize paperSize) { if (paperSize == PaperSize.Letter) { return PrintSetup.LETTER_PAPERSIZE; }//from ww w. j a v a2 s.c om if (paperSize == PaperSize.A4) { return PrintSetup.A4_PAPERSIZE; } if (paperSize == PaperSize.A5) { return PrintSetup.A5_PAPERSIZE; } return 0; }
From source file:org.projectforge.core.ConfigXml.java
License:Open Source License
/** * Supported values "LETTER", default is "DINA4". * @return PrintSetup short value. Default is * @see PrintSetup#A4_PAPERSIZE./*w w w . ja va 2s. c om*/ */ public short getDefaultPaperSize() { if (excelDefaultPaperSizeValue != -42) { return excelDefaultPaperSizeValue; } if ("LETTER".equals(excelDefaultPaperSize) == true) { excelDefaultPaperSizeValue = PrintSetup.LETTER_PAPERSIZE; } else { excelDefaultPaperSizeValue = PrintSetup.A4_PAPERSIZE; } return excelDefaultPaperSizeValue; }
From source file:org.projectforge.excel.ExportConfig.java
License:Open Source License
/** * Supported values "LETTER", default is "DINA4". * @return PrintSetup short value. Default is * @see PrintSetup#A4_PAPERSIZE./* w w w .j a va 2 s.com*/ */ public short getDefaultPaperSizeId() { if (excelDefaultPaperSizeValue != -42) { return excelDefaultPaperSizeValue; } if ("LETTER".equals(excelDefaultPaperSize) == true) { excelDefaultPaperSizeValue = PrintSetup.LETTER_PAPERSIZE; } else { excelDefaultPaperSizeValue = PrintSetup.A4_PAPERSIZE; } return excelDefaultPaperSizeValue; }
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;//www.j a v a 2 s . com } 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); } }
From source file:uk.co.spudsoft.birt.emitters.excel.StyleManagerUtils.java
License:Open Source License
/** * Convert a BIRT paper size string into a POI PrintSetup.*PAPERSIZE constant. * @param name/* w ww .ja v a2s. c o m*/ * The paper size as a BIRT string. * @return * A POI PrintSetup.*PAPERSIZE constant. */ public short getPaperSizeFromString(String name) { if ("a4".equals(name)) { return PrintSetup.A4_PAPERSIZE; } else if ("a3".equals(name)) { return PrintSetup.A3_PAPERSIZE; } else if ("us-letter".equals(name)) { return PrintSetup.LETTER_PAPERSIZE; } return PrintSetup.A4_PAPERSIZE; }