Package com.pdftools.toolbox.pdf.content
Class Glyph
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.content.Glyph
-
public class Glyph extends NativeObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
getPosition()
glyph position (Getter)java.lang.String
getText()
glyph text (Getter)double
getWidth()
glyph width (Getter)-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getText
public java.lang.String getText()
glyph text (Getter)
This is the glyph's associated text.- Throws:
java.lang.IllegalStateException
- the object has already been closed
-
getPosition
public Point getPosition()
glyph position (Getter)
This is the position of the glyph within its
TextFragment
. To find the point on the page this position has to be transformed withTextFragment.getTransform()
.The extent of the glyph with respect to its position depends on the text fragment's
TextFragment.getWritingMode()
. InWritingMode.HORIZONTAL
writing mode, the glyph's position is at the left of the glyph on the height of the base line. InWritingMode.VERTICAL
writing mode, the glyph's position is at the middle of the glyph's horizontal extent, vertically at the top.- Throws:
java.lang.IllegalStateException
- the object has already been closed
-
getWidth
public double getWidth()
glyph width (Getter)
This is the width of the glyph.- Throws:
java.lang.IllegalStateException
- the object has already been closed
-
-