pdftools_toolbox.pdf.content.glyph
Classes
|
- class pdftools_toolbox.pdf.content.glyph.Glyph(handle)[source]
Bases:
_NativeObject
- property text: str
glyph text
This is the glyph’s associated text.
- Returns:
str
- Raises:
StateError – the object has already been closed
- property position: Point
glyph position
This is the position of the glyph within its
pdftools_toolbox.pdf.content.text_fragment.TextFragment
. To find the point on the page this position has to be transformed withpdftools_toolbox.pdf.content.text_fragment.TextFragment.transform
.The extent of the glyph with respect to its position depends on the text fragment’s
pdftools_toolbox.pdf.content.text_fragment.TextFragment.writing_mode
. Inpdftools_toolbox.pdf.content.writing_mode.WritingMode.HORIZONTAL
writing mode, the glyph’s position is at the left of the glyph on the height of the base line. Inpdftools_toolbox.pdf.content.writing_mode.WritingMode.VERTICAL
writing mode, the glyph’s position is at the middle of the glyph’s horizontal extent, vertically at the top.- Returns:
pdftools_toolbox.geometry.real.point.Point
- Raises:
StateError – the object has already been closed
- property width: float
glyph width
This is the width of the glyph.
- Returns:
float
- Raises:
StateError – the object has already been closed