Class AppearanceStyle

java.lang.Object
org.apache.pdfbox.pdmodel.interactive.form.AppearanceStyle

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

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) PDFont
    Get the font used for text formatting.
    (package private) float
    Get the fontSize used for text formatting.
    (package private) float
    Get the leading used for text formatting.
    (package private) void
    Set the font to be used for text formatting.
    (package private) 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 Details

    • font

      private PDFont font
    • 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 Details

    • AppearanceStyle

      AppearanceStyle()
  • Method Details

    • getFont

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

      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

      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.