Class PdfExporter

java.lang.Object
io.keikai.model.impl.pdf.PdfExporter
All Implemented Interfaces:
io.keikai.range.SExporter, Serializable

public class PdfExporter extends Object implements io.keikai.range.SExporter, Serializable
Implementation of Exporter interface that converts Excel data model io.keikai.model.Book into a PDF format written to a OutputStream
Author:
ashish, henri, kuro
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected double
     
    protected int[]
     
    protected double[]
     
    protected int[]
     
    protected io.keikai.model.SSheet
     
    protected int
     
    protected double
     
    protected double
     
    protected com.lowagie.text.Rectangle
     
    protected com.lowagie.text.Font
     
    protected int
     
    protected int
     
    protected TreeSet<io.keikai.model.CellRegion>
     
    protected int
     
    protected boolean
     
    protected int
     
    protected double
     
    protected boolean
     
    protected double
     
    protected double
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected com.lowagie.text.Rectangle
     
    protected List<io.keikai.model.SPicture>
     
    protected int
     
    protected int
     
    protected boolean
     
    protected boolean
     
    protected int
     
    protected int
     
    protected io.keikai.model.SPrintSetup
     
    protected double[]
     
    protected int[]
     
    protected double[]
     
    protected int[]
     
    protected double
     
    protected int[]
     
    protected double[]
     
    protected int[]
     
    protected int
     
    protected String
     
    protected int
     
    protected int
     
    protected int
     
    protected int
     
    protected double
     
    protected double
     
    protected double
     
    protected double
     
    protected boolean
     
    protected io.keikai.model.SBook
     
    protected com.lowagie.text.pdf.PdfWriter
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final String
     
    protected static final String
     
    protected Map<io.keikai.model.SChart,BufferedImage>
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final float
     
    protected static final String
     
    protected static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addExtendRegion(io.keikai.model.CellRegion region)
     
    protected static int[]
    converts List to primitive int[]
    protected com.lowagie.text.pdf.PdfPCell
    createEmptyRowSpanCell(io.keikai.model.SSheet sheet, io.keikai.model.CellRegion outlineRegion, double rowHeight, io.keikai.model.CellRegion renderRegion, int rowIdx, int colIdx, boolean printOutline, boolean printGridline)
     
    protected com.lowagie.text.pdf.PdfPCell
    createPdfCell(io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, io.keikai.model.SCell zssCell, io.keikai.model.CellRegion outlineRegion, io.keikai.model.SSheet sheet, boolean printGridLines, boolean printOutline, boolean extended)
    creates a PdfCell from POI Cell
    protected com.lowagie.text.Font
    createPdfCellFont(io.keikai.model.SFont zssFont)
    returns pdf font corresponding to ZSS cell font
    protected com.lowagie.text.Font
    createPdfCellFont(io.keikai.model.SFont zssFont, String fontName)
    Returns pdf font corresponding to ZSS cell font with a supplimental font face name.
    protected List<com.lowagie.text.Chunk>
    createPdfChunks(io.keikai.model.SFont zssFont, String text, boolean accountingUnder)
    Create and returns pdf chunks per the provided ZSS font, text, and whether contains a Accounting Underline (because it is handled the other way; see CellRenderEvent.drawAccountingUnderline(com.lowagie.text.Rectangle, com.lowagie.text.Rectangle, float, float, float, float, com.lowagie.text.pdf.PdfContentByte))
    protected com.lowagie.text.pdf.PdfPTable
    createPdfTable(int bCol, int eCol, io.keikai.model.SSheet sheet)
     
    protected Object[]
    createPhrase(io.keikai.model.SCell zssCell)
    creates Phrase for corresponding ZSS Cell.
    protected com.lowagie.text.Image
    cropImage(com.lowagie.text.Image image, float origWidth, float origHeight, com.lowagie.text.pdf.PdfWriter writer, float x, float y, float width, float height)
     
    protected void
    drawShapeBorder(com.lowagie.text.pdf.PdfContentByte lineCanvas, float lineWidth, float x1, float y1, float x2, float y2)
     
    void
    export(io.keikai.model.SBook book, File file)
     
    void
    export(io.keikai.model.SBook workbook, OutputStream outputStream)
    Exports Keikai Spreadsheet Book into another format written to a OutputStream.
    void
    export(io.keikai.model.SheetRegion sheetRegion, OutputStream outputStream)
    Exports selected area of Keikai Spreadsheet active sheet represented by io.keikai.model.sys.XRange
    void
    export(io.keikai.model.SSheet worksheet, OutputStream outputStream)
    Exports Keikai Spreadsheet SSheet into another format written to a
    protected void
    exportSheet(io.keikai.model.SSheet sheet, int sheetIndex, com.lowagie.text.Document doc)
    converts POI SSheet to Pdf page(s)
    protected void
    exportSheetSelection(io.keikai.model.SSheet sheet, int sheetIndex, io.keikai.model.CellRegion area, com.lowagie.text.Document doc)
    converts POI SSheet to Pdf page(s)
    protected int
    getAcrossSelectionColumn0(io.keikai.model.SSheet sheet, int rowIdx, int colIdx)
     
    protected int
     
    protected io.keikai.model.SFooter
    getCurrentFooter(io.keikai.model.SSheet sheet)
     
    protected io.keikai.model.SHeader
    getCurrentHeader(io.keikai.model.SSheet sheet)
     
    protected io.keikai.model.SPrintSetup
    getCurrentPrintSetup(io.keikai.model.SSheet sheet)
     
    protected int
    getExtendedEndColumn(io.keikai.model.SSheet sheet, io.keikai.model.SCell zssCell, int colIdx)
     
    protected int
    getExtendedEndColumn0(io.keikai.model.SSheet sheet, io.keikai.model.SCell zssCell, int colIdx)
     
    protected io.keikai.model.CellRegion
    getExtendRegion(int rowIdx, int colIdx)
     
    protected io.keikai.model.CellRegion
    getMergedRegionIfAny(io.keikai.model.SSheet sheet, int rowIdx, int colIdx)
    returns merged region cell range for a given cell
    protected void
    getPictureData(io.keikai.model.SSheet sheet)
    retrieve all zkpictures for given sheet
    protected io.keikai.model.impl.pdf.PixelInfo
    getPixelInfo(io.keikai.model.CellRegion clipRegion)
     
    protected io.keikai.model.CellRegion[]
    getPrintAreas(io.keikai.model.SPrintSetup ps, io.keikai.model.SSheet sheet)
     
    io.keikai.model.SPrintSetup
    Get this setup to setup the exporting parameters for "print" as a PDF document
    protected double
    getRegionHeight(io.keikai.model.CellRegion region)
     
    protected double
    getRegionWidth(io.keikai.model.CellRegion region)
     
    protected double
     
    protected double
     
    protected void
    initDocument(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
    Set pdf page common properties such as margins and document standard font
    protected void
    initDocumentForSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
     
    protected void
    initPrintArea(io.keikai.model.SSheet sheet, io.keikai.model.CellRegion region)
    sets the column bounds for passed SSheet
    protected void
    initRowColumnPositions(io.keikai.model.SSheet sheet)
     
    protected void
    initSelectedPrintArea(io.keikai.model.SSheet sheet)
     
    protected void
    initSheetPrintSetup(io.keikai.model.SSheet sheet)
     
    protected boolean
    isColPageBreak(int col)
     
    protected boolean
    isEvenPage(int no)
     
    protected boolean
    isPartOfMergedRegion(io.keikai.model.SSheet sheet, io.keikai.model.SCell cell)
    checks if POI Cell is part of any merged regions on the passed SSheet
    protected boolean
    isRowPageBreak(int row)
     
    protected boolean
     
    protected boolean
     
    protected void
    layoutCharts(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)
     
    protected void
    layoverPictureIfAny(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)
    lays images over PdfTable
    protected int
    normalizeScale(int scale)
     
    protected io.keikai.model.impl.pdf.RenderInfo
    prepareClipInfo(io.keikai.model.CellRegion clipRegion)
     
    protected void
    prepareColBreaks(io.keikai.model.SSheet sheet, boolean ignoreManualBreaks)
     
    protected int
    prepareFitPageScale(io.keikai.model.SSheet sheet, int fitWidth, int fitHeight)
     
    protected com.lowagie.text.pdf.FontSelector
    prepareFontSelector(io.keikai.model.SFont zssFont)
    Prepare a FontSelector which can apply eastern supplemental fonts to text.
    protected double[]
    preparePageXYInfo(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol)
     
    protected io.keikai.model.impl.pdf.RenderInfo
    prepareRenderInfo(io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, boolean extended, boolean number)
     
    protected void
    prepareRowBreaks(io.keikai.model.SSheet sheet, boolean ignoreManualBreaks)
    Sets column/row breaks if not defined already
    protected int
    prepareScaleX(io.keikai.model.SSheet sheet, int fitWidth)
     
    protected int
    prepareScaleY(io.keikai.model.SSheet sheet, int fitHeight)
     
    protected int
    printCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int colIdx, io.keikai.model.SSheet sheet, double rowHeight, int bRow, int eRow, int bCol, int eCol, io.keikai.model.CellRegion outlineRegion)
     
    protected void
    printColHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int colIdx, float rowHeight)
     
    protected void
    printColHeadings(com.lowagie.text.pdf.PdfPTable pdfTable, int bCol, int eCol, float rowHeight)
     
    protected void
    printHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, com.lowagie.text.Phrase p, float rowHeight)
     
    protected void
    printImage(com.lowagie.text.pdf.PdfContentByte canvas, byte[] rawData, io.keikai.model.ViewAnchor anchor1, io.keikai.model.ViewAnchor anchor2, io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, double pageColumnX, double pageRowY, double clipOffsetX, double clipOffsetY, boolean outline)
     
    protected void
    printPage(int bRow, int eRow, int bCol, int eCol, io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
     
    protected void
    printRow(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int bRow, int eRow, int bCol, int eCol, io.keikai.model.SSheet sheet, float rowHeight, io.keikai.model.CellRegion outlineRegion)
     
    protected void
    printRowHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, float rowHeight)
     
    protected void
    printScalePages(float scale, com.lowagie.text.Document doc, byte[] pdfIn)
     
    protected void
    printScaleSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc, io.keikai.model.SPrintSetup ps)
     
    protected void
    printSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
     
    protected com.lowagie.text.Chunk
    processPdfChunk(io.keikai.model.SFont zssFont, com.lowagie.text.Chunk chunk, boolean accountingUnder)
     
    protected int
    searchNonBlankEndColumn(io.keikai.model.SSheet sheet, int rowIdx, int lastColIdx)
    Returns the last cell that contains value
    protected void
    setCustomPaperSize(float width, float height)
     
    protected void
    setupColumnBreaks(io.keikai.model.SSheet sheet)
    sets auto column breaks based on column width and available page width
    protected com.lowagie.text.Document
    setupExporter(io.keikai.model.SSheet sheet, OutputStream outputStream, com.lowagie.text.Document document)
     
    protected void
    setupRowBreaks(io.keikai.model.SSheet sheet)
    sets auto row breaks based on row heights and available total page height
    protected io.keikai.model.CellRegion
    splitRegionsInBoundaries(io.keikai.model.CellRegion region, int bRow, int eRow, int bCol, int eCol)
     
    protected void
    throwIOException(com.lowagie.text.ExceptionConverter ex)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PAD_TOP

      protected static final float PAD_TOP
      See Also:
    • PAD_BOTTOM

      protected static final float PAD_BOTTOM
      See Also:
    • PAD_LEFT

      protected static final float PAD_LEFT
      See Also:
    • PAD_RIGHT

      protected static final float PAD_RIGHT
      See Also:
    • OUTLINE_WIDTH

      protected static final float OUTLINE_WIDTH
      See Also:
    • GRIDLINE_WIDTH

      protected static final float GRIDLINE_WIDTH
      See Also:
    • DOUBLE_LINE_SPACE

      protected static final float DOUBLE_LINE_SPACE
      See Also:
    • DOUBLE_LINE_WIDTH

      protected static final float DOUBLE_LINE_WIDTH
      See Also:
    • UNDERLINE_WIDTH

      protected static final float UNDERLINE_WIDTH
      See Also:
    • UNDERLINE_OFFSET

      protected static final float UNDERLINE_OFFSET
      See Also:
    • ACCOUNT_UNDERLINE_OFFSET

      protected static final float ACCOUNT_UNDERLINE_OFFSET
      See Also:
    • _wb

      protected io.keikai.model.SBook _wb
    • _writer

      protected com.lowagie.text.pdf.PdfWriter _writer
    • _colBreaks

      protected int[] _colBreaks
    • _rowBreaks

      protected int[] _rowBreaks
    • _firstCol

      protected int _firstCol
    • _endCol

      protected int _endCol
    • _firstRow

      protected int _firstRow
    • _endRow

      protected int _endRow
    • _printCol1

      protected int _printCol1
    • _printCol2

      protected int _printCol2
    • _printRow1

      protected int _printRow1
    • _printRow2

      protected int _printRow2
    • _pageCount

      protected int _pageCount
    • _pageNumber

      protected int _pageNumber
    • _sheetName

      protected String _sheetName
    • _bookName

      protected String _bookName
    • _docStandardFont

      protected com.lowagie.text.Font _docStandardFont
    • _printSetup

      protected io.keikai.model.SPrintSetup _printSetup
    • _paperSize

      protected com.lowagie.text.Rectangle _paperSize
    • _totalHeaderFooterWidth

      protected double _totalHeaderFooterWidth
    • _leftMargin

      protected double _leftMargin
    • _rightMargin

      protected double _rightMargin
    • _topMargin

      protected double _topMargin
    • _bottomMargin

      protected double _bottomMargin
    • _headerMargin

      protected double _headerMargin
    • _footerMargin

      protected double _footerMargin
    • _totalPrintWidth

      protected double _totalPrintWidth
    • _totalPrintHeight

      protected double _totalPrintHeight
    • _repeatColLeft

      protected double[] _repeatColLeft
    • _repeatRowTop

      protected double[] _repeatRowTop
    • _colLeft

      protected double[] _colLeft
    • _rowTop

      protected double[] _rowTop
    • _repeatColLeftPx

      protected int[] _repeatColLeftPx
    • _repeatRowTopPx

      protected int[] _repeatRowTopPx
    • _colLeftPx

      protected int[] _colLeftPx
    • _rowTopPx

      protected int[] _rowTopPx
    • _currentSheetIndex

      protected int _currentSheetIndex
    • _currentShiftX

      protected double _currentShiftX
    • _currentShiftY

      protected double _currentShiftY
    • _pictures

      protected List<io.keikai.model.SPicture> _pictures
    • _firstPage

      protected boolean _firstPage
    • _currentSheet

      protected io.keikai.model.SSheet _currentSheet
    • _titleCol1

      protected int _titleCol1
    • _titleCol2

      protected int _titleCol2
    • _titleRow1

      protected int _titleRow1
    • _titleRow2

      protected int _titleRow2
    • _printGridlines

      protected boolean _printGridlines
    • _printHeadings

      protected boolean _printHeadings
    • _hcenter

      protected boolean _hcenter
    • _vcenter

      protected boolean _vcenter
    • _extendRegions

      protected TreeSet<io.keikai.model.CellRegion> _extendRegions
    • _customPaperSize

      protected com.lowagie.text.Rectangle _customPaperSize
    • _scale

      protected int _scale
    • _pageRow1

      protected int _pageRow1
    • _pageRow2

      protected int _pageRow2
    • _pageCol1

      protected int _pageCol1
    • _pageCol2

      protected int _pageCol2
    • imageCacher

      protected Map<io.keikai.model.SChart,BufferedImage> imageCacher
    • IGNORE_COLUMN_BREAK_PROPERTY_KEY

      protected static final String IGNORE_COLUMN_BREAK_PROPERTY_KEY
      See Also:
    • IGNORE_ROW_BREAK_PROPERTY_KEY

      protected static final String IGNORE_ROW_BREAK_PROPERTY_KEY
      See Also:
    • ZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEY

      protected static final String ZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEY
      See Also:
    • ZSS_IGNORE_ROW_BREAK_PROPERTY_KEY

      protected static final String ZSS_IGNORE_ROW_BREAK_PROPERTY_KEY
      See Also:
  • Constructor Details

    • PdfExporter

      public PdfExporter()
  • Method Details

    • export

      public void export(io.keikai.model.SBook book, File file) throws IOException
      Specified by:
      export in interface io.keikai.range.SExporter
      Throws:
      IOException
    • export

      public void export(io.keikai.model.SBook workbook, OutputStream outputStream) throws IOException
      Exports Keikai Spreadsheet Book into another format written to a OutputStream. Note that it exports entire workbook.
      Specified by:
      export in interface io.keikai.range.SExporter
      Parameters:
      workbook -
      outputStream -
      Throws:
      IOException
    • export

      public void export(io.keikai.model.SSheet worksheet, OutputStream outputStream) throws IOException
      Exports Keikai Spreadsheet SSheet into another format written to a
      Parameters:
      worksheet - sheet instance that contains selected area
      outputStream - outoutStream to which exported contents to be written
      Throws:
      IOException
    • export

      public void export(io.keikai.model.SheetRegion sheetRegion, OutputStream outputStream) throws IOException
      Exports selected area of Keikai Spreadsheet active sheet represented by io.keikai.model.sys.XRange
      Parameters:
      worksheet - sheet instance that contains selected area
      area - area representing selected area to be exported
      outputStream - outoutStream to which exported contents to be written
      Throws:
      IOException
    • throwIOException

      protected void throwIOException(com.lowagie.text.ExceptionConverter ex) throws IOException
      Throws:
      IOException
    • setupExporter

      protected com.lowagie.text.Document setupExporter(io.keikai.model.SSheet sheet, OutputStream outputStream, com.lowagie.text.Document document) throws com.lowagie.text.DocumentException
      Parameters:
      outputStream -
      Throws:
      com.lowagie.text.DocumentException
    • printScalePages

      protected void printScalePages(float scale, com.lowagie.text.Document doc, byte[] pdfIn) throws IOException
      Throws:
      IOException
    • normalizeScale

      protected int normalizeScale(int scale)
    • printScaleSheet

      protected void printScaleSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc, io.keikai.model.SPrintSetup ps) throws IOException
      Throws:
      IOException
    • prepareFitPageScale

      protected int prepareFitPageScale(io.keikai.model.SSheet sheet, int fitWidth, int fitHeight)
    • prepareScaleY

      protected int prepareScaleY(io.keikai.model.SSheet sheet, int fitHeight)
    • prepareScaleX

      protected int prepareScaleX(io.keikai.model.SSheet sheet, int fitWidth)
    • exportSheetSelection

      protected void exportSheetSelection(io.keikai.model.SSheet sheet, int sheetIndex, io.keikai.model.CellRegion area, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
      converts POI SSheet to Pdf page(s)
      Parameters:
      sheet -
      Throws:
      com.lowagie.text.DocumentException
      IOException
    • initRowColumnPositions

      protected void initRowColumnPositions(io.keikai.model.SSheet sheet)
    • exportSheet

      protected void exportSheet(io.keikai.model.SSheet sheet, int sheetIndex, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
      converts POI SSheet to Pdf page(s)
      Parameters:
      sheet -
      Throws:
      com.lowagie.text.DocumentException
      IOException
    • getPrintAreas

      protected io.keikai.model.CellRegion[] getPrintAreas(io.keikai.model.SPrintSetup ps, io.keikai.model.SSheet sheet)
    • getPictureData

      protected void getPictureData(io.keikai.model.SSheet sheet)
      retrieve all zkpictures for given sheet
      Parameters:
      sheet -
    • prepareRowBreaks

      protected void prepareRowBreaks(io.keikai.model.SSheet sheet, boolean ignoreManualBreaks)
      Sets column/row breaks if not defined already
      Parameters:
      sheet -
    • prepareColBreaks

      protected void prepareColBreaks(io.keikai.model.SSheet sheet, boolean ignoreManualBreaks)
    • setupRowBreaks

      protected void setupRowBreaks(io.keikai.model.SSheet sheet)
      sets auto row breaks based on row heights and available total page height
      Parameters:
      sheet -
    • setupColumnBreaks

      protected void setupColumnBreaks(io.keikai.model.SSheet sheet)
      sets auto column breaks based on column width and available page width
      Parameters:
      sheet -
    • isColPageBreak

      protected boolean isColPageBreak(int col)
    • isRowPageBreak

      protected boolean isRowPageBreak(int row)
    • convertIntegers

      protected static int[] convertIntegers(List<Integer> integers)
      converts List to primitive int[]
      Parameters:
      integers -
      Returns:
    • setCustomPaperSize

      protected void setCustomPaperSize(float width, float height)
    • initDocument

      protected void initDocument(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
      Set pdf page common properties such as margins and document standard font
      Parameters:
      SSheet - sheet
    • initDocumentForSheet

      protected void initDocumentForSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc)
    • printSheet

      protected void printSheet(io.keikai.model.SSheet sheet, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
      Throws:
      com.lowagie.text.DocumentException
      IOException
    • printPage

      protected void printPage(int bRow, int eRow, int bCol, int eCol, io.keikai.model.SSheet sheet, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • printRow

      protected void printRow(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int bRow, int eRow, int bCol, int eCol, io.keikai.model.SSheet sheet, float rowHeight, io.keikai.model.CellRegion outlineRegion)
    • printCell

      protected int printCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int colIdx, io.keikai.model.SSheet sheet, double rowHeight, int bRow, int eRow, int bCol, int eCol, io.keikai.model.CellRegion outlineRegion)
    • createEmptyRowSpanCell

      protected com.lowagie.text.pdf.PdfPCell createEmptyRowSpanCell(io.keikai.model.SSheet sheet, io.keikai.model.CellRegion outlineRegion, double rowHeight, io.keikai.model.CellRegion renderRegion, int rowIdx, int colIdx, boolean printOutline, boolean printGridline)
    • splitRegionsInBoundaries

      protected io.keikai.model.CellRegion splitRegionsInBoundaries(io.keikai.model.CellRegion region, int bRow, int eRow, int bCol, int eCol)
    • getExtendRegion

      protected io.keikai.model.CellRegion getExtendRegion(int rowIdx, int colIdx)
    • addExtendRegion

      protected void addExtendRegion(io.keikai.model.CellRegion region)
    • createPdfTable

      protected com.lowagie.text.pdf.PdfPTable createPdfTable(int bCol, int eCol, io.keikai.model.SSheet sheet) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • printColHeadings

      protected void printColHeadings(com.lowagie.text.pdf.PdfPTable pdfTable, int bCol, int eCol, float rowHeight)
    • printColHeadingCell

      protected void printColHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int colIdx, float rowHeight)
    • printRowHeadingCell

      protected void printRowHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, float rowHeight)
    • printHeadingCell

      protected void printHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, com.lowagie.text.Phrase p, float rowHeight)
    • preparePageXYInfo

      protected double[] preparePageXYInfo(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol)
    • printImage

      protected void printImage(com.lowagie.text.pdf.PdfContentByte canvas, byte[] rawData, io.keikai.model.ViewAnchor anchor1, io.keikai.model.ViewAnchor anchor2, io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, double pageColumnX, double pageRowY, double clipOffsetX, double clipOffsetY, boolean outline) throws IOException
      Throws:
      IOException
    • drawShapeBorder

      protected void drawShapeBorder(com.lowagie.text.pdf.PdfContentByte lineCanvas, float lineWidth, float x1, float y1, float x2, float y2)
    • layoverPictureIfAny

      protected void layoverPictureIfAny(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer) throws IOException
      lays images over PdfTable
      Parameters:
      sheet -
      bRow -
      eRow -
      bCol -
      eCol -
      Throws:
      IOException
    • cropImage

      protected com.lowagie.text.Image cropImage(com.lowagie.text.Image image, float origWidth, float origHeight, com.lowagie.text.pdf.PdfWriter writer, float x, float y, float width, float height) throws com.lowagie.text.DocumentException
      Throws:
      com.lowagie.text.DocumentException
    • layoutCharts

      protected void layoutCharts(io.keikai.model.SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer) throws IOException
      Throws:
      IOException
    • getMergedRegionIfAny

      protected io.keikai.model.CellRegion getMergedRegionIfAny(io.keikai.model.SSheet sheet, int rowIdx, int colIdx)
      returns merged region cell range for a given cell
      Parameters:
      sheet -
      cell -
      Returns:
    • isPartOfMergedRegion

      protected boolean isPartOfMergedRegion(io.keikai.model.SSheet sheet, io.keikai.model.SCell cell)
      checks if POI Cell is part of any merged regions on the passed SSheet
      Parameters:
      SSheet - sheet
      Cell - cell
      Returns:
      boolean
    • createPdfCell

      protected com.lowagie.text.pdf.PdfPCell createPdfCell(io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, io.keikai.model.SCell zssCell, io.keikai.model.CellRegion outlineRegion, io.keikai.model.SSheet sheet, boolean printGridLines, boolean printOutline, boolean extended)
      creates a PdfCell from POI Cell
      Parameters:
      zssCell -
      Returns:
      PdfCell
    • prepareClipInfo

      protected io.keikai.model.impl.pdf.RenderInfo prepareClipInfo(io.keikai.model.CellRegion clipRegion)
    • prepareRenderInfo

      protected io.keikai.model.impl.pdf.RenderInfo prepareRenderInfo(io.keikai.model.CellRegion clipRegion, io.keikai.model.CellRegion renderRegion, boolean extended, boolean number)
    • getRegionWidth

      protected double getRegionWidth(io.keikai.model.CellRegion region)
    • getRegionHeight

      protected double getRegionHeight(io.keikai.model.CellRegion region)
    • createPhrase

      protected Object[] createPhrase(io.keikai.model.SCell zssCell)
      creates Phrase for corresponding ZSS Cell. If contents are RichString Phrase is constructed out of several Chunk object each representing different sections of rich text.
      Parameters:
      zssCell -
      Returns:
    • createPdfCellFont

      protected com.lowagie.text.Font createPdfCellFont(io.keikai.model.SFont zssFont)
      returns pdf font corresponding to ZSS cell font
      Parameters:
      zssFont -
      Returns:
    • createPdfCellFont

      protected com.lowagie.text.Font createPdfCellFont(io.keikai.model.SFont zssFont, String fontName)
      Returns pdf font corresponding to ZSS cell font with a supplimental font face name.
      Parameters:
      zssFont -
      fontName -
      Returns:
    • prepareFontSelector

      protected com.lowagie.text.pdf.FontSelector prepareFontSelector(io.keikai.model.SFont zssFont)
      Prepare a FontSelector which can apply eastern supplemental fonts to text.
    • createPdfChunks

      protected List<com.lowagie.text.Chunk> createPdfChunks(io.keikai.model.SFont zssFont, String text, boolean accountingUnder)
      Create and returns pdf chunks per the provided ZSS font, text, and whether contains a Accounting Underline (because it is handled the other way; see CellRenderEvent.drawAccountingUnderline(com.lowagie.text.Rectangle, com.lowagie.text.Rectangle, float, float, float, float, com.lowagie.text.pdf.PdfContentByte))
    • processPdfChunk

      protected com.lowagie.text.Chunk processPdfChunk(io.keikai.model.SFont zssFont, com.lowagie.text.Chunk chunk, boolean accountingUnder)
    • searchNonBlankEndColumn

      protected int searchNonBlankEndColumn(io.keikai.model.SSheet sheet, int rowIdx, int lastColIdx)
      Returns the last cell that contains value
      Returns:
      last cell column index of the row
    • initSelectedPrintArea

      protected void initSelectedPrintArea(io.keikai.model.SSheet sheet)
    • initPrintArea

      protected void initPrintArea(io.keikai.model.SSheet sheet, io.keikai.model.CellRegion region)
      sets the column bounds for passed SSheet
      Parameters:
      sheet -
    • getExtendedEndColumn

      protected int getExtendedEndColumn(io.keikai.model.SSheet sheet, io.keikai.model.SCell zssCell, int colIdx)
    • getAcrossSelectionColumn0

      protected int getAcrossSelectionColumn0(io.keikai.model.SSheet sheet, int rowIdx, int colIdx)
    • getExtendedEndColumn0

      protected int getExtendedEndColumn0(io.keikai.model.SSheet sheet, io.keikai.model.SCell zssCell, int colIdx)
    • getPrintSetup

      public io.keikai.model.SPrintSetup getPrintSetup()
      Get this setup to setup the exporting parameters for "print" as a PDF document
      Returns:
    • initSheetPrintSetup

      protected void initSheetPrintSetup(io.keikai.model.SSheet sheet)
    • getCurrentPrintSetup

      protected io.keikai.model.SPrintSetup getCurrentPrintSetup(io.keikai.model.SSheet sheet)
    • getCurrentHeader

      protected io.keikai.model.SHeader getCurrentHeader(io.keikai.model.SSheet sheet)
    • getCurrentFooter

      protected io.keikai.model.SFooter getCurrentFooter(io.keikai.model.SSheet sheet)
    • isEvenPage

      protected boolean isEvenPage(int no)
    • isUseColTitles

      protected boolean isUseColTitles()
    • isUseRowTitles

      protected boolean isUseRowTitles()
    • getCountOfColTitles

      protected int getCountOfColTitles()
    • getTitleWidth

      protected double getTitleWidth()
    • getTitleHeight

      protected double getTitleHeight()
    • getPixelInfo

      protected io.keikai.model.impl.pdf.PixelInfo getPixelInfo(io.keikai.model.CellRegion clipRegion)