Class PDFText

java.lang.Object
io.keikai.doc.io.schema.pdf.PDFText
All Implemented Interfaces:
IPDFElement, PDFInline

public class PDFText extends Object implements PDFInline
Internal Use Only.

Represents a text in a PDF document.

Author:
Jamson Chan
  • Constructor Details

    • PDFText

      public PDFText(char text, io.keikai.doc.api.impl.node.style.TextStyle style, PdfFont pdfFont)
      Create a PDFText instance.
      Parameters:
      text - the character of the PDFText
      style - the style of the PDFText
  • Method Details

    • getText

      public String getText()
      Returns the text String of the PDFText.
      Returns:
      the text String of the PDFText
    • getColor

      public Color getColor()
      Returns the Color of the PDFText.
      Returns:
      the Color of the PDFText
    • getBackgroundColor

      public Color getBackgroundColor()
      Returns the background Color of the PDFText.
      Returns:
      the background Color of the PDFText
    • getFont

      public org.apache.pdfbox.pdmodel.font.PDFont getFont()
      Returns the PDFont of the PDFText.
      Returns:
      the PDFont of the PDFText
    • isStrikethrough

      public boolean isStrikethrough()
      Returns whether the PDFText is strikethrough.
      Returns:
      whether the PDFText is strikethrough
    • getFontSize

      public float getFontSize()
      Returns the font size of the PDFText.
      Returns:
      the font size of the PDFText
    • isUnderline

      public boolean isUnderline()
      Returns whether the PDFText is underline.
      Returns:
      whether the PDFText is underline
    • isSuperscript

      public boolean isSuperscript()
      Returns whether the PDFText is superscript.
      Returns:
      whether the PDFText is superscript
    • isSubscript

      public boolean isSubscript()
      Returns whether the PDFText is subscript.
      Returns:
      whether the PDFText is subscript
    • getWidth

      public float getWidth()
      Returns the width of the PDFText.
      Specified by:
      getWidth in interface PDFInline
      Returns:
      the width of the PDFText
    • isSpace

      public boolean isSpace()
      Returns whether the PDFText is a space.
      Specified by:
      isSpace in interface PDFInline
      Returns:
      whether the PDFText is a space
    • isNotDef

      public boolean isNotDef()
      Returns whether the PDFText is not defined.
      Returns:
      whether the PDFText is not defined