Class PDFLine


  • public class PDFLine
    extends java.lang.Object
    Internal Use Only.

    Represents a line of text in PDF.

    • Constructor Detail

      • PDFLine

        public PDFLine​(float leftX,
                       float rightX,
                       float lineHeight)
        Create a PDFLine instance.
        Parameters:
        leftX - the left x position of the line
        rightX - the right x position of the line
        lineHeight - the line height of the line
    • Method Detail

      • getRuns

        public java.util.List<PDFRun> getRuns()
        Returns the PDFRuns in the line.
        Returns:
        the PDFRuns in the line.
      • getLeftX

        public float getLeftX()
        Returns the left x position of the line.
        Returns:
        the left x position of the line
      • getRightX

        public float getRightX()
        Returns the right x position of the line.
        Returns:
        the right x position of the line
      • getWidth

        public float getWidth()
        Returns the width of the line.
        Returns:
        the width of the line
      • getHeight

        public float getHeight()
        Returns the height of the line.
        Returns:
        the height of the line
      • getLeading

        public float getLeading()
        Returns the leading of the line.
        Returns:
        the leading of the line
      • getNonSuffixSpacesCount

        public int getNonSuffixSpacesCount()
        Returns the number of non-suffix spaces in the line.
        Returns:
        the number of non-suffix spaces in the line
      • getWidthExceptSuffixSpaces

        public float getWidthExceptSuffixSpaces()
        Returns the total width ignores the suffix spaces.

        Note that this width could start from text or space, and MUST be ends with text.

        Returns:
        the total width of the text in the line
      • getNonSpaceWidth

        public float getNonSpaceWidth()
        Returns the sum width of all the text (non-space) in the line.
        Returns:
        the sum width of all the text (non-space) in the line.