Class PdfBoxTextRenderer

  • All Implemented Interfaces:
    com.openhtmltopdf.extend.TextRenderer

    public class PdfBoxTextRenderer
    extends Object
    implements com.openhtmltopdf.extend.TextRenderer
    • Constructor Detail

      • PdfBoxTextRenderer

        public PdfBoxTextRenderer()
    • Method Detail

      • setup

        public void setup​(com.openhtmltopdf.extend.FontContext context,
                          com.openhtmltopdf.bidi.BidiReorderer reorderer)
      • drawString

        public void drawString​(com.openhtmltopdf.extend.OutputDevice outputDevice,
                               String string,
                               float x,
                               float y)
        Specified by:
        drawString in interface com.openhtmltopdf.extend.TextRenderer
      • drawString

        public void drawString​(com.openhtmltopdf.extend.OutputDevice outputDevice,
                               String string,
                               float x,
                               float y,
                               com.openhtmltopdf.render.JustificationInfo info)
        Specified by:
        drawString in interface com.openhtmltopdf.extend.TextRenderer
      • getFSFontMetrics

        public com.openhtmltopdf.render.FSFontMetrics getFSFontMetrics​(com.openhtmltopdf.extend.FontContext context,
                                                                       com.openhtmltopdf.render.FSFont font,
                                                                       String string)
        Specified by:
        getFSFontMetrics in interface com.openhtmltopdf.extend.TextRenderer
      • isJustificationSpace

        public static boolean isJustificationSpace​(int c)
      • getWidth

        public int getWidth​(com.openhtmltopdf.extend.FontContext context,
                            com.openhtmltopdf.render.FSFont font,
                            String string)
        Specified by:
        getWidth in interface com.openhtmltopdf.extend.TextRenderer
      • setFontScale

        public void setFontScale​(float scale)
        Specified by:
        setFontScale in interface com.openhtmltopdf.extend.TextRenderer
      • getFontScale

        public float getFontScale()
        Specified by:
        getFontScale in interface com.openhtmltopdf.extend.TextRenderer
      • setSmoothingThreshold

        public void setSmoothingThreshold​(float fontsize)
        Specified by:
        setSmoothingThreshold in interface com.openhtmltopdf.extend.TextRenderer
      • getSmoothingLevel

        public int getSmoothingLevel()
        Specified by:
        getSmoothingLevel in interface com.openhtmltopdf.extend.TextRenderer
      • setSmoothingLevel

        @Deprecated
        public void setSmoothingLevel​(int level)
        Deprecated.
        Specified by:
        setSmoothingLevel in interface com.openhtmltopdf.extend.TextRenderer
      • setup

        public void setup​(com.openhtmltopdf.extend.FontContext context)
        Specified by:
        setup in interface com.openhtmltopdf.extend.TextRenderer