Class AppearanceStyle


  • public class AppearanceStyle
    extends java.lang.Object
    Define styling attributes to be used for text formatting.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private PDFont font  
      private float fontSize
      The font size to be used for text formatting.
      private float leading
      The leading (distance between lines) to be used for text formatting.
    • Constructor Summary

      Constructors 
      Constructor Description
      AppearanceStyle()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) PDFont getFont()
      Get the font used for text formatting.
      (package private) float getFontSize()
      Get the fontSize used for text formatting.
      (package private) float getLeading()
      Get the leading used for text formatting.
      void setFont​(PDFont font)
      Set the font to be used for text formatting.
      void setFontSize​(float fontSize)
      Set the font size to be used for formatting.
      (package private) void setLeading​(float leading)
      Set the leading used for text formatting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fontSize

        private float fontSize
        The font size to be used for text formatting. Defaulting to 12 to match Acrobats default.
      • leading

        private float leading
        The leading (distance between lines) to be used for text formatting. Defaulting to 1.2*fontSize to match Acrobats default.
    • Constructor Detail

      • AppearanceStyle

        public AppearanceStyle()
    • Method Detail

      • getFont

        PDFont getFont()
        Get the font used for text formatting.
        Returns:
        the font used for text formatting.
      • setFont

        public void setFont​(PDFont font)
        Set the font to be used for text formatting.
        Parameters:
        font - the font to be used.
      • getFontSize

        float getFontSize()
        Get the fontSize used for text formatting.
        Returns:
        the fontSize used for text formatting.
      • setFontSize

        public void setFontSize​(float fontSize)
        Set the font size to be used for formatting.
        Parameters:
        fontSize - the font size.
      • getLeading

        float getLeading()
        Get the leading used for text formatting.
        Returns:
        the leading used for text formatting.
      • setLeading

        void setLeading​(float leading)
        Set the leading used for text formatting.
        Parameters:
        leading - the leading to be used.