Class AbstractSpreadSheetPdfProclet

    • Field Detail

      • m_FontTableHeader

        protected PdfFont m_FontTableHeader
        the font for the table header.
      • m_ColorTableHeader

        protected Color m_ColorTableHeader
        the color for the table header.
      • m_BackgroundTableHeader

        protected Color m_BackgroundTableHeader
        the background color for the table header.
      • m_FontGeneralContent

        protected PdfFont m_FontGeneralContent
        the font for general content.
      • m_ColorGeneralContent

        protected Color m_ColorGeneralContent
        the color for general content.
      • m_FontNumericContent

        protected PdfFont m_FontNumericContent
        the font for numeric content.
      • m_ColorNumericContent

        protected Color m_ColorNumericContent
        the color for the numeric content.
      • m_Extensions

        protected BaseString[] m_Extensions
        the file extensions.
      • m_NumDecimals

        protected int m_NumDecimals
        the number of decimals for numbers in tables.
      • m_Reader

        protected SpreadSheetReader m_Reader
        the reader to use for loading the csv files.
      • m_WidthPercentage

        protected float m_WidthPercentage
        the percentage of the page width to occupy.
      • m_UseAbsolutePosition

        protected boolean m_UseAbsolutePosition
        whether to use absolute position.
      • m_X

        protected float m_X
        the absolute X position.
      • m_Y

        protected float m_Y
        the absolute Y position.
      • m_RelativeColumnWidths

        protected BaseFloat[] m_RelativeColumnWidths
        the relative column widths (ignored if not provided).
    • Constructor Detail

      • AbstractSpreadSheetPdfProclet

        public AbstractSpreadSheetPdfProclet()
    • Method Detail

      • setFontTableHeader

        public void setFontTableHeader​(PdfFont value)
        Sets the font to use for the table header.
        Parameters:
        value - the font
      • getFontTableHeader

        public PdfFont getFontTableHeader()
        Returns the font to use for the table header.
        Returns:
        the font
      • fontTableHeaderTipText

        public String fontTableHeaderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColorTableHeader

        public void setColorTableHeader​(Color value)
        Sets the color to use for the table header.
        Parameters:
        value - the color
      • getColorTableHeader

        public Color getColorTableHeader()
        Returns the color to use for the table header.
        Returns:
        the color
      • colorTableHeaderTipText

        public String colorTableHeaderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setBackgroundTableHeader

        public void setBackgroundTableHeader​(Color value)
        Sets the background color to use for the table header.
        Parameters:
        value - the color
      • getBackgroundTableHeader

        public Color getBackgroundTableHeader()
        Returns the background color to use for the table header.
        Returns:
        the color
      • backgroundTableHeaderTipText

        public String backgroundTableHeaderTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFontGeneralContent

        public void setFontGeneralContent​(PdfFont value)
        Sets the font to use for adding general content.
        Parameters:
        value - the font
      • getFontGeneralContent

        public PdfFont getFontGeneralContent()
        Returns the font to use for adding the content.
        Returns:
        the font
      • fontGeneralContentTipText

        public String fontGeneralContentTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColorGeneralContent

        public void setColorGeneralContent​(Color value)
        Sets the color to use for general content.
        Parameters:
        value - the color
      • getColorGeneralContent

        public Color getColorGeneralContent()
        Returns the color to use for general content.
        Returns:
        the color
      • colorGeneralContentTipText

        public String colorGeneralContentTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setFontNumericContent

        public void setFontNumericContent​(PdfFont value)
        Sets the font to use for adding general content.
        Parameters:
        value - the font
      • getFontNumericContent

        public PdfFont getFontNumericContent()
        Returns the font to use for adding the content.
        Returns:
        the font
      • fontNumericContentTipText

        public String fontNumericContentTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColorNumericContent

        public void setColorNumericContent​(Color value)
        Sets the color to use for numeric content.
        Parameters:
        value - the color
      • getColorNumericContent

        public Color getColorNumericContent()
        Returns the color to use for numeric content.
        Returns:
        the color
      • colorNumericContentTipText

        public String colorNumericContentTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNumDecimals

        public void setNumDecimals​(int value)
        Sets the number of decimals for numbers in tables.
        Parameters:
        value - the number of decimals
      • getNumDecimals

        public int getNumDecimals()
        Returns the number of decimals for numbers in tables.
        Returns:
        the number of decimals
      • numDecimalsTipText

        public String numDecimalsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setReader

        public void setReader​(SpreadSheetReader value)
        Sets the reader for the spreadsheets.
        Parameters:
        value - the reader
      • getReader

        public SpreadSheetReader getReader()
        Returns the reader for the spreadsheets.
        Returns:
        the reader
      • readerTipText

        public String readerTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setWidthPercentage

        public void setWidthPercentage​(float value)
        Sets the percentage of the page width to occupy.
        Parameters:
        value - the percentage
      • getWidthPercentage

        public float getWidthPercentage()
        Returns the percentage of the page with to occupy.
        Returns:
        the percentage
      • widthPercentageTipText

        public String widthPercentageTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • horizontalAlignmentTipText

        public String horizontalAlignmentTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setRelativeColumnWidths

        public void setRelativeColumnWidths​(BaseFloat[] value)
        Sets the relative column widths (0-1), ignored if not provided, uses 1 by default.
        Parameters:
        value - the widths
      • getRelativeColumnWidths

        public BaseFloat[] getRelativeColumnWidths()
        Returns the relative column widths (0-1), ignored if not provided, uses 1 by default.
        Returns:
        the widths
      • relativeColumnWidthsTipText

        public String relativeColumnWidthsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • toBaseColor

        protected com.itextpdf.text.BaseColor toBaseColor​(Color color)
        Converts the color into itextpdf color.
        Parameters:
        color - the color to convert
        Returns:
        the converted color
      • relativeColumnsWidths

        protected float[] relativeColumnsWidths​(SpreadSheet sheet)
        Computes the relative column widths.
        Parameters:
        sheet - the sheet to determine the number of columns from
        Returns:
        the widths
      • doProcess

        protected boolean doProcess​(PDFGenerator generator,
                                    File file)
                             throws Exception
        The actual processing of the document.
        Specified by:
        doProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        file - the file to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • canProcess

        public boolean canProcess​(PDFGenerator generator,
                                  Object obj)
        Whether the processor can handle this particular object.
        Specified by:
        canProcess in interface PdfProclet
        Specified by:
        canProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        obj - the object to check
        Returns:
        true if the object can be handled
      • doProcess

        protected abstract boolean doProcess​(PDFGenerator generator,
                                             SpreadSheet sheet)
                                      throws Exception
        The actual processing of the document.
        Parameters:
        generator - the context
        sheet - the spreadsheet to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong
      • doProcess

        protected boolean doProcess​(PDFGenerator generator,
                                    Object obj)
                             throws Exception
        The actual processing of the document.
        Specified by:
        doProcess in class AbstractPdfProclet
        Parameters:
        generator - the context
        obj - the object to add
        Returns:
        true if successfully added
        Throws:
        Exception - if something goes wrong