Package io.keikai.model.impl.pdf
Class PdfExporter
- java.lang.Object
-
- io.keikai.model.impl.pdf.PdfExporter
-
- All Implemented Interfaces:
SExporter,Serializable
public class PdfExporter extends Object implements SExporter, Serializable
Implementation ofExporterinterface that converts Excel data modelio.keikai.model.Bookinto a PDF format written to aOutputStream- Author:
- ashish, henri, kuro
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String_bookNameprotected double_bottomMarginprotected int[]_colBreaksprotected double[]_colLeftprotected int[]_colLeftPxprotected SSheet_currentSheetprotected int_currentSheetIndexprotected double_currentShiftXprotected double_currentShiftYprotected com.lowagie.text.Rectangle_customPaperSizeprotected com.lowagie.text.Font_docStandardFontprotected int_endColprotected int_endRowprotected TreeSet<CellRegion>_extendRegionsprotected int_firstColprotected boolean_firstPageprotected int_firstRowprotected double_footerMarginprotected boolean_hcenterprotected double_headerMarginprotected double_leftMarginprotected int_pageCol1protected int_pageCol2protected int_pageCountprotected int_pageNumberprotected int_pageRow1protected int_pageRow2protected com.lowagie.text.Rectangle_paperSizeprotected List<SPicture>_picturesprotected int_printCol1protected int_printCol2protected boolean_printGridlinesprotected boolean_printHeadingsprotected int_printRow1protected int_printRow2protected SPrintSetup_printSetupprotected double[]_repeatColLeftprotected int[]_repeatColLeftPxprotected double[]_repeatRowTopprotected int[]_repeatRowTopPxprotected double_rightMarginprotected int[]_rowBreaksprotected double[]_rowTopprotected int[]_rowTopPxprotected int_scaleprotected String_sheetNameprotected int_titleCol1protected int_titleCol2protected int_titleRow1protected int_titleRow2protected double_topMarginprotected double_totalHeaderFooterWidthprotected double_totalPrintHeightprotected double_totalPrintWidthprotected boolean_vcenterprotected SBook_wbprotected com.lowagie.text.pdf.PdfWriter_writerprotected static floatACCOUNT_UNDERLINE_OFFSETprotected static floatDOUBLE_LINE_SPACEprotected static floatDOUBLE_LINE_WIDTHprotected static floatGRIDLINE_WIDTHprotected static StringIGNORE_COLUMN_BREAK_PROPERTY_KEYprotected static StringIGNORE_ROW_BREAK_PROPERTY_KEYprotected Map<SChart,BufferedImage>imageCacherprotected static floatOUTLINE_WIDTHprotected static floatPAD_BOTTOMprotected static floatPAD_LEFTprotected static floatPAD_RIGHTprotected static floatPAD_TOPprotected static floatUNDERLINE_OFFSETprotected static floatUNDERLINE_WIDTHprotected static StringZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEYprotected static StringZSS_IGNORE_ROW_BREAK_PROPERTY_KEY
-
Constructor Summary
Constructors Constructor Description PdfExporter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddExtendRegion(CellRegion region)protected static int[]convertIntegers(List<Integer> integers)converts Listto primitive int[] protected com.lowagie.text.pdf.PdfPCellcreateEmptyRowSpanCell(SSheet sheet, CellRegion outlineRegion, double rowHeight, CellRegion renderRegion, int rowIdx, int colIdx, boolean printOutline, boolean printGridline)protected com.lowagie.text.pdf.PdfPCellcreatePdfCell(CellRegion clipRegion, CellRegion renderRegion, SCell zssCell, CellRegion outlineRegion, SSheet sheet, boolean printGridLines, boolean printOutline, boolean extended)creates a PdfCell from POICellprotected com.lowagie.text.FontcreatePdfCellFont(SFont zssFont)returns pdf font corresponding to ZSS cell fontprotected com.lowagie.text.FontcreatePdfCellFont(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(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; seeCellRenderEvent.drawAccountingUnderline(com.lowagie.text.Rectangle, com.lowagie.text.Rectangle, float, float, float, float, com.lowagie.text.pdf.PdfContentByte))protected com.lowagie.text.pdf.PdfPTablecreatePdfTable(int bCol, int eCol, SSheet sheet)protected Object[]createPhrase(SCell zssCell)creates Phrase for corresponding ZSS Cell.protected com.lowagie.text.ImagecropImage(com.lowagie.text.Image image, float origWidth, float origHeight, com.lowagie.text.pdf.PdfWriter writer, float x, float y, float width, float height)protected voiddrawShapeBorder(com.lowagie.text.pdf.PdfContentByte lineCanvas, float lineWidth, float x1, float y1, float x2, float y2)voidexport(SBook book, File file)Export a bookvoidexport(SBook workbook, OutputStream outputStream)Exports Keikai SpreadsheetBookinto another format written to aOutputStream.voidexport(SheetRegion sheetRegion, OutputStream outputStream)Exports selected area of Keikai Spreadsheet active sheet represented byio.keikai.model.sys.XRangevoidexport(SSheet worksheet, OutputStream outputStream)Exports Keikai SpreadsheetSSheetinto another format written to aprotected voidexportSheet(SSheet sheet, int sheetIndex, com.lowagie.text.Document doc)converts POISSheetto Pdf page(s)protected voidexportSheetSelection(SSheet sheet, int sheetIndex, CellRegion area, com.lowagie.text.Document doc)converts POISSheetto Pdf page(s)protected intgetAcrossSelectionColumn0(SSheet sheet, int rowIdx, int colIdx)protected intgetCountOfColTitles()protected SFootergetCurrentFooter(SSheet sheet)protected SHeadergetCurrentHeader(SSheet sheet)protected SPrintSetupgetCurrentPrintSetup(SSheet sheet)protected intgetExtendedEndColumn(SSheet sheet, SCell zssCell, int colIdx)protected intgetExtendedEndColumn0(SSheet sheet, SCell zssCell, int colIdx)protected CellRegiongetExtendRegion(int rowIdx, int colIdx)protected CellRegiongetMergedRegionIfAny(SSheet sheet, int rowIdx, int colIdx)returns merged region cell range for a given cellprotected voidgetPictureData(SSheet sheet)retrieve all zkpictures for given sheetprotected io.keikai.model.impl.pdf.PixelInfogetPixelInfo(CellRegion clipRegion)protected CellRegion[]getPrintAreas(SPrintSetup ps, SSheet sheet)SPrintSetupgetPrintSetup()Get this setup to setup the exporting parameters for "print" as a PDF documentprotected doublegetRegionHeight(CellRegion region)protected doublegetRegionWidth(CellRegion region)protected doublegetTitleHeight()protected doublegetTitleWidth()protected voidinitDocument(SSheet sheet, com.lowagie.text.Document doc)Set pdf page common properties such as margins and document standard fontprotected voidinitDocumentForSheet(SSheet sheet, com.lowagie.text.Document doc)protected voidinitPrintArea(SSheet sheet, CellRegion region)sets the column bounds for passedSSheetprotected voidinitRowColumnPositions(SSheet sheet)protected voidinitSelectedPrintArea(SSheet sheet)protected voidinitSheetPrintSetup(SSheet sheet)protected booleanisColPageBreak(int col)protected booleanisEvenPage(int no)protected booleanisPartOfMergedRegion(SSheet sheet, SCell cell)checks if POICellis part of any merged regions on the passedSSheetprotected booleanisRowPageBreak(int row)protected booleanisUseColTitles()protected booleanisUseRowTitles()protected voidlayoutCharts(SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)protected voidlayoverPictureIfAny(SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)lays images over PdfTableprotected intnormalizeScale(int scale)protected io.keikai.model.impl.pdf.RenderInfoprepareClipInfo(CellRegion clipRegion)protected voidprepareColBreaks(SSheet sheet, boolean ignoreManualBreaks)protected intprepareFitPageScale(SSheet sheet, int fitWidth, int fitHeight)protected com.lowagie.text.pdf.FontSelectorprepareFontSelector(SFont zssFont)Prepare a FontSelector which can apply eastern supplemental fonts to text.protected double[]preparePageXYInfo(SSheet sheet, int bRow, int eRow, int bCol, int eCol)protected io.keikai.model.impl.pdf.RenderInfoprepareRenderInfo(CellRegion clipRegion, CellRegion renderRegion, boolean extended, boolean number)protected voidprepareRowBreaks(SSheet sheet, boolean ignoreManualBreaks)Sets column/row breaks if not defined alreadyprotected intprepareScaleX(SSheet sheet, int fitWidth)protected intprepareScaleY(SSheet sheet, int fitHeight)protected intprintCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int colIdx, SSheet sheet, double rowHeight, int bRow, int eRow, int bCol, int eCol, CellRegion outlineRegion)protected voidprintColHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int colIdx, float rowHeight)protected voidprintColHeadings(com.lowagie.text.pdf.PdfPTable pdfTable, int bCol, int eCol, float rowHeight)protected voidprintHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, com.lowagie.text.Phrase p, float rowHeight)protected voidprintImage(com.lowagie.text.pdf.PdfContentByte canvas, byte[] rawData, ViewAnchor anchor1, ViewAnchor anchor2, CellRegion clipRegion, CellRegion renderRegion, double pageColumnX, double pageRowY, double clipOffsetX, double clipOffsetY, boolean outline)protected voidprintPage(int bRow, int eRow, int bCol, int eCol, SSheet sheet, com.lowagie.text.Document doc)protected voidprintRow(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int bRow, int eRow, int bCol, int eCol, SSheet sheet, float rowHeight, CellRegion outlineRegion)protected voidprintRowHeadingCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, float rowHeight)protected voidprintScalePages(float scale, com.lowagie.text.Document doc, byte[] pdfIn)protected voidprintScaleSheet(SSheet sheet, com.lowagie.text.Document doc, SPrintSetup ps)protected voidprintSheet(SSheet sheet, com.lowagie.text.Document doc)protected com.lowagie.text.ChunkprocessPdfChunk(SFont zssFont, com.lowagie.text.Chunk chunk, boolean accountingUnder)protected intsearchNonBlankEndColumn(SSheet sheet, int rowIdx, int lastColIdx)Returns the last cell that contains valueprotected voidsetCustomPaperSize(float width, float height)protected voidsetupColumnBreaks(SSheet sheet)sets auto column breaks based on column width and available page widthprotected com.lowagie.text.DocumentsetupExporter(SSheet sheet, OutputStream outputStream, com.lowagie.text.Document document)protected voidsetupRowBreaks(SSheet sheet)sets auto row breaks based on row heights and available total page heightprotected CellRegionsplitRegionsInBoundaries(CellRegion region, int bRow, int eRow, int bCol, int eCol)protected voidthrowIOException(com.lowagie.text.ExceptionConverter ex)
-
-
-
Field Detail
-
PAD_TOP
protected static final float PAD_TOP
- See Also:
- Constant Field Values
-
PAD_BOTTOM
protected static final float PAD_BOTTOM
- See Also:
- Constant Field Values
-
PAD_LEFT
protected static final float PAD_LEFT
- See Also:
- Constant Field Values
-
PAD_RIGHT
protected static final float PAD_RIGHT
- See Also:
- Constant Field Values
-
OUTLINE_WIDTH
protected static final float OUTLINE_WIDTH
- See Also:
- Constant Field Values
-
GRIDLINE_WIDTH
protected static final float GRIDLINE_WIDTH
- See Also:
- Constant Field Values
-
DOUBLE_LINE_SPACE
protected static final float DOUBLE_LINE_SPACE
- See Also:
- Constant Field Values
-
DOUBLE_LINE_WIDTH
protected static final float DOUBLE_LINE_WIDTH
- See Also:
- Constant Field Values
-
UNDERLINE_WIDTH
protected static final float UNDERLINE_WIDTH
- See Also:
- Constant Field Values
-
UNDERLINE_OFFSET
protected static final float UNDERLINE_OFFSET
- See Also:
- Constant Field Values
-
ACCOUNT_UNDERLINE_OFFSET
protected static final float ACCOUNT_UNDERLINE_OFFSET
- See Also:
- Constant Field Values
-
_wb
protected 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 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
-
_firstPage
protected boolean _firstPage
-
_currentSheet
protected 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<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<SChart,BufferedImage> imageCacher
-
IGNORE_COLUMN_BREAK_PROPERTY_KEY
protected static final String IGNORE_COLUMN_BREAK_PROPERTY_KEY
- See Also:
- Constant Field Values
-
IGNORE_ROW_BREAK_PROPERTY_KEY
protected static final String IGNORE_ROW_BREAK_PROPERTY_KEY
- See Also:
- Constant Field Values
-
ZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEY
protected static final String ZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEY
- See Also:
- Constant Field Values
-
ZSS_IGNORE_ROW_BREAK_PROPERTY_KEY
protected static final String ZSS_IGNORE_ROW_BREAK_PROPERTY_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
export
public void export(SBook book, File file) throws IOException
Description copied from interface:SExporterExport a book- Specified by:
exportin interfaceSExporter- Parameters:
book- the book to exportfile- the output file to store data- Throws:
IOException
-
export
public void export(SBook workbook, OutputStream outputStream) throws IOException
Exports Keikai SpreadsheetBookinto another format written to aOutputStream. Note that it exports entire workbook.- Specified by:
exportin interfaceSExporter- Parameters:
workbook-outputStream-- Throws:
IOException
-
export
public void export(SSheet worksheet, OutputStream outputStream) throws IOException
Exports Keikai SpreadsheetSSheetinto another format written to a- Parameters:
worksheet- sheet instance that contains selected areaoutputStream- outoutStream to which exported contents to be written- Throws:
IOException
-
export
public void export(SheetRegion sheetRegion, OutputStream outputStream) throws IOException
Exports selected area of Keikai Spreadsheet active sheet represented byio.keikai.model.sys.XRange- Parameters:
worksheet- sheet instance that contains selected areaarea- area representing selected area to be exportedoutputStream- 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(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(SSheet sheet, com.lowagie.text.Document doc, SPrintSetup ps) throws IOException
- Throws:
IOException
-
prepareFitPageScale
protected int prepareFitPageScale(SSheet sheet, int fitWidth, int fitHeight)
-
prepareScaleY
protected int prepareScaleY(SSheet sheet, int fitHeight)
-
prepareScaleX
protected int prepareScaleX(SSheet sheet, int fitWidth)
-
exportSheetSelection
protected void exportSheetSelection(SSheet sheet, int sheetIndex, CellRegion area, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
converts POISSheetto Pdf page(s)- Parameters:
sheet-- Throws:
com.lowagie.text.DocumentExceptionIOException
-
initRowColumnPositions
protected void initRowColumnPositions(SSheet sheet)
-
exportSheet
protected void exportSheet(SSheet sheet, int sheetIndex, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
converts POISSheetto Pdf page(s)- Parameters:
sheet-- Throws:
com.lowagie.text.DocumentExceptionIOException
-
getPrintAreas
protected CellRegion[] getPrintAreas(SPrintSetup ps, SSheet sheet)
-
getPictureData
protected void getPictureData(SSheet sheet)
retrieve all zkpictures for given sheet- Parameters:
sheet-
-
prepareRowBreaks
protected void prepareRowBreaks(SSheet sheet, boolean ignoreManualBreaks)
Sets column/row breaks if not defined already- Parameters:
sheet-
-
prepareColBreaks
protected void prepareColBreaks(SSheet sheet, boolean ignoreManualBreaks)
-
setupRowBreaks
protected void setupRowBreaks(SSheet sheet)
sets auto row breaks based on row heights and available total page height- Parameters:
sheet-
-
setupColumnBreaks
protected void setupColumnBreaks(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 Listto primitive int[] - Parameters:
integers-- Returns:
-
setCustomPaperSize
protected void setCustomPaperSize(float width, float height)
-
initDocument
protected void initDocument(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(SSheet sheet, com.lowagie.text.Document doc)
-
printSheet
protected void printSheet(SSheet sheet, com.lowagie.text.Document doc) throws com.lowagie.text.DocumentException, IOException
- Throws:
com.lowagie.text.DocumentExceptionIOException
-
printPage
protected void printPage(int bRow, int eRow, int bCol, int eCol, 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, SSheet sheet, float rowHeight, CellRegion outlineRegion)
-
printCell
protected int printCell(com.lowagie.text.pdf.PdfPTable pdfTable, int rowIdx, int colIdx, SSheet sheet, double rowHeight, int bRow, int eRow, int bCol, int eCol, CellRegion outlineRegion)
-
createEmptyRowSpanCell
protected com.lowagie.text.pdf.PdfPCell createEmptyRowSpanCell(SSheet sheet, CellRegion outlineRegion, double rowHeight, CellRegion renderRegion, int rowIdx, int colIdx, boolean printOutline, boolean printGridline)
-
splitRegionsInBoundaries
protected CellRegion splitRegionsInBoundaries(CellRegion region, int bRow, int eRow, int bCol, int eCol)
-
getExtendRegion
protected CellRegion getExtendRegion(int rowIdx, int colIdx)
-
addExtendRegion
protected void addExtendRegion(CellRegion region)
-
createPdfTable
protected com.lowagie.text.pdf.PdfPTable createPdfTable(int bCol, int eCol, 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(SSheet sheet, int bRow, int eRow, int bCol, int eCol)
-
printImage
protected void printImage(com.lowagie.text.pdf.PdfContentByte canvas, byte[] rawData, ViewAnchor anchor1, ViewAnchor anchor2, CellRegion clipRegion, 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(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(SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer) throws IOException
- Throws:
IOException
-
getMergedRegionIfAny
protected CellRegion getMergedRegionIfAny(SSheet sheet, int rowIdx, int colIdx)
returns merged region cell range for a given cell- Parameters:
sheet-cell-- Returns:
-
isPartOfMergedRegion
protected boolean isPartOfMergedRegion(SSheet sheet, SCell cell)
checks if POICellis part of any merged regions on the passedSSheet- Parameters:
SSheet- sheetCell- cell- Returns:
- boolean
-
createPdfCell
protected com.lowagie.text.pdf.PdfPCell createPdfCell(CellRegion clipRegion, CellRegion renderRegion, SCell zssCell, CellRegion outlineRegion, SSheet sheet, boolean printGridLines, boolean printOutline, boolean extended)
creates a PdfCell from POICell- Parameters:
zssCell-- Returns:
- PdfCell
-
prepareClipInfo
protected io.keikai.model.impl.pdf.RenderInfo prepareClipInfo(CellRegion clipRegion)
-
prepareRenderInfo
protected io.keikai.model.impl.pdf.RenderInfo prepareRenderInfo(CellRegion clipRegion, CellRegion renderRegion, boolean extended, boolean number)
-
getRegionWidth
protected double getRegionWidth(CellRegion region)
-
getRegionHeight
protected double getRegionHeight(CellRegion region)
-
createPhrase
protected Object[] createPhrase(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(SFont zssFont)
returns pdf font corresponding to ZSS cell font- Parameters:
zssFont-- Returns:
-
createPdfCellFont
protected com.lowagie.text.Font createPdfCellFont(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(SFont zssFont)
Prepare a FontSelector which can apply eastern supplemental fonts to text.
-
createPdfChunks
protected List<com.lowagie.text.Chunk> createPdfChunks(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; seeCellRenderEvent.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(SFont zssFont, com.lowagie.text.Chunk chunk, boolean accountingUnder)
-
searchNonBlankEndColumn
protected int searchNonBlankEndColumn(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(SSheet sheet)
-
initPrintArea
protected void initPrintArea(SSheet sheet, CellRegion region)
sets the column bounds for passedSSheet- Parameters:
sheet-
-
getAcrossSelectionColumn0
protected int getAcrossSelectionColumn0(SSheet sheet, int rowIdx, int colIdx)
-
getPrintSetup
public SPrintSetup getPrintSetup()
Get this setup to setup the exporting parameters for "print" as a PDF document- Returns:
-
initSheetPrintSetup
protected void initSheetPrintSetup(SSheet sheet)
-
getCurrentPrintSetup
protected SPrintSetup getCurrentPrintSetup(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(CellRegion clipRegion)
-
-