Class Letter
A glyph or combination of glyphs (characters) drawn by a PDF content stream.
public class Letter
- Inheritance
-
Letter
- Inherited Members
Constructors
Letter(string, PdfRectangle, PdfPoint, PdfPoint, double, double, FontDetails, TextRenderingMode, IColor, IColor, double, int)
Create a new letter to represent some text drawn by the Tj operator.
public Letter(string value, PdfRectangle glyphRectangle, PdfPoint startBaseLine, PdfPoint endBaseLine, double width, double fontSize, FontDetails font, TextRenderingMode renderingMode, IColor strokeColor, IColor fillColor, double pointSize, int textSequence)
Parameters
value
stringglyphRectangle
PdfRectanglestartBaseLine
PdfPointendBaseLine
PdfPointwidth
doublefontSize
doublefont
FontDetailsrenderingMode
TextRenderingModestrokeColor
IColorfillColor
IColorpointSize
doubletextSequence
int
Properties
Color
The primary color of the letter, which is either the StrokeColor in case RenderingMode is Stroke, or otherwise it is the FillColor.
public IColor Color { get; }
Property Value
EndBaseLine
The end point of the baseline.
public PdfPoint EndBaseLine { get; }
Property Value
FillColor
Non-stroking (fill) color
public IColor FillColor { get; }
Property Value
Font
Details about the font for this letter.
public FontDetails Font { get; }
Property Value
FontName
The name of the font.
public string FontName { get; }
Property Value
FontSize
Size as defined in the PDF file. This is not equivalent to font size in points but is relative to other font sizes on the page.
public double FontSize { get; }
Property Value
GlyphRectangle
Position of the bounding box for the glyph, this is the box surrounding the visible glyph as it appears on the page. For example letters with descenders, p, j, etc., will have a box extending below the Location they are placed at. The width of the glyph may also be more or less than the Width allocated for the character in the PDF content.
public PdfRectangle GlyphRectangle { get; }
Property Value
Location
The placement position of the character in PDF space. See StartBaseLine
public PdfPoint Location { get; }
Property Value
PointSize
The size of the font in points.
public double PointSize { get; }
Property Value
RenderingMode
Text rendering mode that indicates whether we should draw this letter's strokes, fill, both, neither (in case of hidden text), etc. If it calls for stroking the StrokeColor is used. If it calls for filling, the FillColor is used. In modes that perform both filling and stroking, the effect is as if each glyph outline were filled and then stroked in separate operations.
public TextRenderingMode RenderingMode { get; }
Property Value
StartBaseLine
The placement position of the character in PDF space (the start point of the baseline). See Location
public PdfPoint StartBaseLine { get; }
Property Value
StrokeColor
Stroking color
public IColor StrokeColor { get; }
Property Value
TextOrientation
Text orientation of the letter.
public TextOrientation TextOrientation { get; }
Property Value
TextSequence
Sequence number of the ShowText operation that printed this letter.
public int TextSequence { get; }
Property Value
Value
The text for this letter or unicode character.
public string Value { get; }
Property Value
Width
The width occupied by the character within the PDF content.
public double Width { get; }
Property Value
Methods
ToString()
Produces a string representation of the letter and its position.
public override string ToString()