public class TextRenderInfo extends Object
PdfContentStreamProcessor
and
RenderListener
objects as text rendering operations are
discoveredModifier and Type | Method and Description |
---|---|
LineSegment |
getAscentLine()
Gets the ascentline for the text (i.e.
|
LineSegment |
getBaseline()
Gets the baseline for the text (i.e.
|
List<TextRenderInfo> |
getCharacterRenderInfos()
Provides detail useful if a listener needs access to the position of each individual glyph in the text render operation
|
LineSegment |
getDescentLine()
Gets the descentline for the text (i.e.
|
BaseColor |
getFillColor() |
DocumentFont |
getFont()
Getter for the font
|
Integer |
getMcid() |
PdfString |
getPdfString() |
float |
getRise()
The rise represents how far above the nominal baseline the text should be rendered.
|
float |
getSingleSpaceWidth() |
BaseColor |
getStrokeColor() |
String |
getText() |
int |
getTextRenderMode() |
LineSegment |
getUnscaledBaseline() |
boolean |
hasMcid(int mcid)
Checks if the text belongs to a marked content sequence
with a given mcid.
|
boolean |
hasMcid(int mcid,
boolean checkTheTopmostLevelOnly)
Checks if the text belongs to a marked content sequence
with a given mcid.
|
public String getText()
public PdfString getPdfString()
public boolean hasMcid(int mcid)
mcid
- a marked content idpublic boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly)
mcid
- a marked content idcheckTheTopmostLevelOnly
- indicates whether to check the topmost level of marked content stack onlypublic Integer getMcid()
public LineSegment getBaseline()
getRise()
for the amount added by Risepublic LineSegment getUnscaledBaseline()
public LineSegment getAscentLine()
getRise()
for the amount added by Risepublic LineSegment getDescentLine()
getRise()
for the amount added by Risepublic DocumentFont getFont()
public float getRise()
getBaseline()
, getAscentLine()
and getDescentLine()
methods already include Rise.
This method is exposed to allow listeners to determine if an explicit rise was involved in the computation of the baseline (this might be useful, for example, for identifying superscript rendering)public float getSingleSpaceWidth()
public int getTextRenderMode()
public BaseColor getFillColor()
public BaseColor getStrokeColor()
public List<TextRenderInfo> getCharacterRenderInfos()
TextRenderInfo
objects that represent each glyph used in the draw operation. The next effect is if there was a separate Tj opertion for each character in the rendered stringCopyright © 2019. All rights reserved.