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 ofExporter
interface that converts Excel data modelio.keikai.model.Book
into a PDF format written to aOutputStream
- Author:
- ashish, henri, kuro
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_bookName
protected double
_bottomMargin
protected int[]
_colBreaks
protected double[]
_colLeft
protected int[]
_colLeftPx
protected SSheet
_currentSheet
protected int
_currentSheetIndex
protected double
_currentShiftX
protected double
_currentShiftY
protected com.lowagie.text.Rectangle
_customPaperSize
protected com.lowagie.text.Font
_docStandardFont
protected int
_endCol
protected int
_endRow
protected TreeSet<CellRegion>
_extendRegions
protected int
_firstCol
protected boolean
_firstPage
protected int
_firstRow
protected double
_footerMargin
protected boolean
_hcenter
protected double
_headerMargin
protected double
_leftMargin
protected int
_pageCol1
protected int
_pageCol2
protected int
_pageCount
protected int
_pageNumber
protected int
_pageRow1
protected int
_pageRow2
protected com.lowagie.text.Rectangle
_paperSize
protected List<SPicture>
_pictures
protected int
_printCol1
protected int
_printCol2
protected boolean
_printGridlines
protected boolean
_printHeadings
protected int
_printRow1
protected int
_printRow2
protected SPrintSetup
_printSetup
protected double[]
_repeatColLeft
protected int[]
_repeatColLeftPx
protected double[]
_repeatRowTop
protected int[]
_repeatRowTopPx
protected double
_rightMargin
protected int[]
_rowBreaks
protected double[]
_rowTop
protected int[]
_rowTopPx
protected int
_scale
protected String
_sheetName
protected int
_titleCol1
protected int
_titleCol2
protected int
_titleRow1
protected int
_titleRow2
protected double
_topMargin
protected double
_totalHeaderFooterWidth
protected double
_totalPrintHeight
protected double
_totalPrintWidth
protected boolean
_vcenter
protected SBook
_wb
protected com.lowagie.text.pdf.PdfWriter
_writer
protected static float
ACCOUNT_UNDERLINE_OFFSET
protected static float
DOUBLE_LINE_SPACE
protected static float
DOUBLE_LINE_WIDTH
protected static float
GRIDLINE_WIDTH
protected static String
IGNORE_COLUMN_BREAK_PROPERTY_KEY
protected static String
IGNORE_ROW_BREAK_PROPERTY_KEY
protected Map<SChart,BufferedImage>
imageCacher
protected static float
OUTLINE_WIDTH
protected static float
PAD_BOTTOM
protected static float
PAD_LEFT
protected static float
PAD_RIGHT
protected static float
PAD_TOP
protected static float
UNDERLINE_OFFSET
protected static float
UNDERLINE_WIDTH
protected static String
ZSS_IGNORE_COLUMN_BREAK_PROPERTY_KEY
protected static String
ZSS_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 void
addExtendRegion(CellRegion region)
protected static int[]
convertIntegers(List<Integer> integers)
converts Listto primitive int[] protected com.lowagie.text.pdf.PdfPCell
createEmptyRowSpanCell(SSheet sheet, CellRegion outlineRegion, double rowHeight, CellRegion renderRegion, int rowIdx, int colIdx, boolean printOutline, boolean printGridline)
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
protected com.lowagie.text.Font
createPdfCellFont(SFont zssFont)
returns pdf font corresponding to ZSS cell fontprotected com.lowagie.text.Font
createPdfCellFont(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.PdfPTable
createPdfTable(int bCol, int eCol, SSheet sheet)
protected Object[]
createPhrase(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(SBook book, File file)
Export a bookvoid
export(SBook workbook, OutputStream outputStream)
Exports Keikai SpreadsheetBook
into another format written to aOutputStream
.void
export(SheetRegion sheetRegion, OutputStream outputStream)
Exports selected area of Keikai Spreadsheet active sheet represented byio.keikai.model.sys.XRange
void
export(SSheet worksheet, OutputStream outputStream)
Exports Keikai SpreadsheetSSheet
into another format written to aprotected void
exportSheet(SSheet sheet, int sheetIndex, com.lowagie.text.Document doc)
converts POISSheet
to Pdf page(s)protected void
exportSheetSelection(SSheet sheet, int sheetIndex, CellRegion area, com.lowagie.text.Document doc)
converts POISSheet
to Pdf page(s)protected int
getAcrossSelectionColumn0(SSheet sheet, int rowIdx, int colIdx)
protected int
getCountOfColTitles()
protected SFooter
getCurrentFooter(SSheet sheet)
protected SHeader
getCurrentHeader(SSheet sheet)
protected SPrintSetup
getCurrentPrintSetup(SSheet sheet)
protected int
getExtendedEndColumn(SSheet sheet, SCell zssCell, int colIdx)
protected int
getExtendedEndColumn0(SSheet sheet, SCell zssCell, int colIdx)
protected CellRegion
getExtendRegion(int rowIdx, int colIdx)
protected CellRegion
getMergedRegionIfAny(SSheet sheet, int rowIdx, int colIdx)
returns merged region cell range for a given cellprotected void
getPictureData(SSheet sheet)
retrieve all zkpictures for given sheetprotected io.keikai.model.impl.pdf.PixelInfo
getPixelInfo(CellRegion clipRegion)
protected CellRegion[]
getPrintAreas(SPrintSetup ps, SSheet sheet)
SPrintSetup
getPrintSetup()
Get this setup to setup the exporting parameters for "print" as a PDF documentprotected double
getRegionHeight(CellRegion region)
protected double
getRegionWidth(CellRegion region)
protected double
getTitleHeight()
protected double
getTitleWidth()
protected void
initDocument(SSheet sheet, com.lowagie.text.Document doc)
Set pdf page common properties such as margins and document standard fontprotected void
initDocumentForSheet(SSheet sheet, com.lowagie.text.Document doc)
protected void
initPrintArea(SSheet sheet, CellRegion region)
sets the column bounds for passedSSheet
protected void
initRowColumnPositions(SSheet sheet)
protected void
initSelectedPrintArea(SSheet sheet)
protected void
initSheetPrintSetup(SSheet sheet)
protected boolean
isColPageBreak(int col)
protected boolean
isEvenPage(int no)
protected boolean
isPartOfMergedRegion(SSheet sheet, SCell cell)
checks if POICell
is part of any merged regions on the passedSSheet
protected boolean
isRowPageBreak(int row)
protected boolean
isUseColTitles()
protected boolean
isUseRowTitles()
protected void
layoutCharts(SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)
protected void
layoverPictureIfAny(SSheet sheet, int bRow, int eRow, int bCol, int eCol, com.lowagie.text.pdf.PdfWriter writer)
lays images over PdfTableprotected int
normalizeScale(int scale)
protected io.keikai.model.impl.pdf.RenderInfo
prepareClipInfo(CellRegion clipRegion)
protected void
prepareColBreaks(SSheet sheet, boolean ignoreManualBreaks)
protected int
prepareFitPageScale(SSheet sheet, int fitWidth, int fitHeight)
protected com.lowagie.text.pdf.FontSelector
prepareFontSelector(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.RenderInfo
prepareRenderInfo(CellRegion clipRegion, CellRegion renderRegion, boolean extended, boolean number)
protected void
prepareRowBreaks(SSheet sheet, boolean ignoreManualBreaks)
Sets column/row breaks if not defined alreadyprotected int
prepareScaleX(SSheet sheet, int fitWidth)
protected int
prepareScaleY(SSheet sheet, int fitHeight)
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)
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, ViewAnchor anchor1, ViewAnchor anchor2, CellRegion clipRegion, CellRegion renderRegion, double pageColumnX, double pageRowY, double clipOffsetX, double clipOffsetY, boolean outline)
protected void
printPage(int bRow, int eRow, int bCol, int eCol, 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, SSheet sheet, float rowHeight, 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(SSheet sheet, com.lowagie.text.Document doc, SPrintSetup ps)
protected void
printSheet(SSheet sheet, com.lowagie.text.Document doc)
protected com.lowagie.text.Chunk
processPdfChunk(SFont zssFont, com.lowagie.text.Chunk chunk, boolean accountingUnder)
protected int
searchNonBlankEndColumn(SSheet sheet, int rowIdx, int lastColIdx)
Returns the last cell that contains valueprotected void
setCustomPaperSize(float width, float height)
protected void
setupColumnBreaks(SSheet sheet)
sets auto column breaks based on column width and available page widthprotected com.lowagie.text.Document
setupExporter(SSheet sheet, OutputStream outputStream, com.lowagie.text.Document document)
protected void
setupRowBreaks(SSheet sheet)
sets auto row breaks based on row heights and available total page heightprotected CellRegion
splitRegionsInBoundaries(CellRegion region, int bRow, int eRow, int bCol, int eCol)
protected void
throwIOException(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:SExporter
Export a book- Specified by:
export
in 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 SpreadsheetBook
into another format written to aOutputStream
. Note that it exports entire workbook.- Specified by:
export
in interfaceSExporter
- Parameters:
workbook
-outputStream
-- Throws:
IOException
-
export
public void export(SSheet worksheet, OutputStream outputStream) throws IOException
Exports Keikai SpreadsheetSSheet
into 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 POISSheet
to Pdf page(s)- Parameters:
sheet
-- Throws:
com.lowagie.text.DocumentException
IOException
-
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 POISSheet
to Pdf page(s)- Parameters:
sheet
-- Throws:
com.lowagie.text.DocumentException
IOException
-
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.DocumentException
IOException
-
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 POICell
is 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)
-
-