Package io.keikai.doc.io.schema.pdf
Class PDFLine
- java.lang.Object
-
- io.keikai.doc.io.schema.pdf.PDFLine
-
public class PDFLine extends java.lang.ObjectInternal Use Only.Represents a line of text in PDF.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRuns(PDFInlineItem inlineItem)AddPDFRuns by givenPDFInlineItem.floatgetHeight()Returns the height of the line.floatgetLeading()Returns the leading of the line.floatgetLeftX()Returns the left x position of the line.floatgetNonSpaceWidth()Returns the sum width of all the text (non-space) in the line.intgetNonSuffixSpacesCount()Returns the number of non-suffix spaces in the line.floatgetRightX()Returns the right x position of the line.java.util.List<PDFRun>getRuns()Returns thePDFRuns in the line.floatgetWidth()Returns the width of the line.floatgetWidthExceptSuffixSpaces()Returns the total width ignores the suffix spaces.
-
-
-
Constructor Detail
-
PDFLine
public PDFLine(float leftX, float rightX, float lineHeight)Create aPDFLineinstance.- Parameters:
leftX- the left x position of the linerightX- the right x position of the linelineHeight- the line height of the line
-
-
Method Detail
-
getRuns
public java.util.List<PDFRun> getRuns()
Returns thePDFRuns in the line.- Returns:
- the
PDFRuns in the line.
-
addRuns
public void addRuns(PDFInlineItem inlineItem)
AddPDFRuns by givenPDFInlineItem.- Parameters:
inlineItem- thePDFInlineItemcontaining thePDFRuns to add
-
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.
-
-