Interface IPdfBoxGraphics2DFontTextDrawer

    • Method Detail

      • canDrawText

        boolean canDrawText​(java.text.AttributedCharacterIterator iterator,
                            IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv env)
                     throws java.io.IOException,
                            java.awt.FontFormatException
        Parameters:
        iterator - Has the text and all its properties
        env - Environment
        Returns:
        true when the given text can be fully drawn using fonts. return false to have the text drawn as vector shapes
        Throws:
        java.io.IOException - when a font can not be loaded or a paint can't be applied.
        java.awt.FontFormatException - when the font file can not be loaded
      • drawText

        void drawText​(java.text.AttributedCharacterIterator iterator,
                      IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv env)
               throws java.io.IOException,
                      java.awt.FontFormatException
        Parameters:
        iterator - The text with all properties
        env - Environment
        Throws:
        java.io.IOException - when a font can not be loaded or a paint can't be applied.
        java.awt.FontFormatException - when the font file can not be loaded
      • getFontMetrics

        java.awt.FontMetrics getFontMetrics​(java.awt.Font font,
                                            IPdfBoxGraphics2DFontTextDrawer.IFontTextDrawerEnv env)
                                     throws java.io.IOException,
                                            java.awt.FontFormatException
        Parameters:
        font - the Font
        env - the Environment
        Returns:
        the resulting font metrics
        Throws:
        java.io.IOException
        java.awt.FontFormatException