Table of Contents

Class TextLine

Namespace
PDFjet.NET
Assembly
PDFjet.dll

Used to create text line objects.

public class TextLine : IBaselineDrawable, IDrawable
Inheritance
TextLine
Implements
Inherited Members

Constructors

TextLine(Font)

Constructor for creating text line objects.

public TextLine(Font font)

Parameters

font Font

the font to use.

TextLine(Font, string)

Constructor for creating text line objects.

public TextLine(Font font, string text)

Parameters

font Font

the font to use.

text string

the text.

Methods

DrawOn(Page)

Draws this text line on the specified page.

public float[] DrawOn(Page page)

Parameters

page Page

the page to draw this text line on.

Returns

float[]

x and y coordinates of the bottom right corner of this component.

GetAltDescription()

Returns the alternate description of this text line.

public string GetAltDescription()

Returns

string

GetAscent()

Returns how far above its baseline this text line reaches.

public float GetAscent()

Returns

float

the ascent of the font at the font size of this text line.

GetDecorationColor()

Returns a copy of the color of the underline and strikeout lines.

public float[] GetDecorationColor()

Returns

float[]

GetDescent()

Returns how far below its baseline this text line reaches.

public float GetDescent()

Returns

float

the descent of the font at the font size of this text line.

GetDestination()

Returns the name of the destination that DrawOn adds to the page.

public string GetDestination()

Returns

string

the destination name, or null.

GetFallbackFont()

Returns the fallback font.

public Font GetFallbackFont()

Returns

Font

the fallback font.

GetFont()

Gets the font to use for this text line.

public Font GetFont()

Returns

Font

font the font to use.

GetFontSize()

Returns the font size.

public float GetFontSize()

Returns

float

GetGoToAction()

Returns the GoTo action string.

public string GetGoToAction()

Returns

string

the GoTo action string.

GetHeight()

Returns the height of this TextLine.

public float GetHeight()

Returns

float

the height.

GetHighlightColors()

Returns the colors used to highlight words in the text.

public Dictionary<string, int> GetHighlightColors()

Returns

Dictionary<string, int>

GetLanguage()

Returns the language of the text.

public string GetLanguage()

Returns

string

GetLocation()

Returns the x coordinate of the start of the text and the y coordinate of its baseline.

public float[] GetLocation()

Returns

float[]

GetScriptPosition()

Returns the script position.

public ScriptPosition GetScriptPosition()

Returns

ScriptPosition

the script position.

GetStrikeout()

Returns the strikeout flag.

public bool GetStrikeout()

Returns

bool

the strikeout flag.

GetText()

Returns the text.

public string GetText()

Returns

string

the text.

GetTextColor()

Returns a copy of the text color.

public float[] GetTextColor()

Returns

float[]

GetTextRotation()

Returns the text direction.

public int GetTextRotation()

Returns

int

the text direction.

GetURIAction()

Returns the action URI.

public string GetURIAction()

Returns

string

the action URI.

GetURIActualText()

Returns the actual text of the link annotation.

public string GetURIActualText()

Returns

string

GetURIAltDescription()

Returns the alternate description of the link annotation.

public string GetURIAltDescription()

Returns

string

GetURILanguage()

Returns the language of the link annotation.

public string GetURILanguage()

Returns

string

GetUnderline()

Returns the underline flag.

public bool GetUnderline()

Returns

bool

the underline flag.

GetVerticalOffset()

Returns the vertical text offset: the one set with SetVerticalOffset, or that of the script position at the font and font size of this text line.

public float GetVerticalOffset()

Returns

float

the vertical text offset.

GetWidth()

Returns the width of this TextLine.

public float GetWidth()

Returns

float

the width.

SetAltDescription(string)

Sets the alternate description of this text line.

public TextLine SetAltDescription(string altDescription)

Parameters

altDescription string

the alternate description of the text line.

Returns

TextLine

this TextLine.

SetDecorationColor(int)

Sets the color of the underline and strikeout lines as a 0xRRGGBB value. Color.transparent leaves it unchanged.

public TextLine SetDecorationColor(int color)

Parameters

color int

Returns

TextLine

SetDecorationColor(float[])

Sets the color of the underline and strikeout lines from an array of red, green and blue values.

public TextLine SetDecorationColor(float[] rgbColor)

Parameters

rgbColor float[]

Returns

TextLine

SetDestination(string)

Sets the name of a destination that DrawOn adds to the page, a font size above the baseline, so that a GoTo action with the name, which SetGoToAction sets, goes to this line.

public TextLine SetDestination(string name)

Parameters

name string

the destination name, or null for none.

Returns

TextLine

this TextLine.

SetFallbackFont(Font)

Sets the fallback font.

public TextLine SetFallbackFont(Font fallbackFont)

Parameters

fallbackFont Font

the fallback font.

Returns

TextLine

this TextLine.

SetFont(Font)

Sets the font to use for this text line. The fallback font changes with it, unless a different fallback font was set.

public TextLine SetFont(Font font)

Parameters

font Font

the font to use.

Returns

TextLine

this TextLine.

SetFontSize(float)

Sets the font size to use for this text line.

public TextLine SetFontSize(float fontSize)

Parameters

fontSize float

the fontSize to use.

Returns

TextLine

this TextLine.

SetGoToAction(string)

Sets the destination key for the action.

public TextLine SetGoToAction(string key)

Parameters

key string

the destination name.

Returns

TextLine

this TextLine.

SetHighlightColors(Dictionary<string, int>)

Sets the colors used to highlight words in the text.

public TextLine SetHighlightColors(Dictionary<string, int> colorMap)

Parameters

colorMap Dictionary<string, int>

Returns

TextLine

SetLanguage(string)

Sets the language of the text, for example "en-US".

public TextLine SetLanguage(string language)

Parameters

language string

Returns

TextLine

SetLocation(float, float)

Sets the location where this text line will be drawn on the page.

public TextLine SetLocation(float x, float y)

Parameters

x float

the x coordinate of the text line.

y float

the y coordinate of the text line.

Returns

TextLine

this TextLine.

SetScriptPosition(ScriptPosition)

Sets the script position. The offset of a superscript or subscript follows the font and font size of this text line when it is drawn.

public TextLine SetScriptPosition(ScriptPosition scriptPosition)

Parameters

scriptPosition ScriptPosition

ScriptPosition.NORMAL, ScriptPosition.SUBSCRIPT or ScriptPosition.SUPERSCRIPT.

Returns

TextLine

this TextLine.

SetStrikeout(bool)

Sets the strike variable. If the value of the strike variable is 'true' - a strike line is drawn through the text.

public TextLine SetStrikeout(bool strikeout)

Parameters

strikeout bool

the strike value.

Returns

TextLine

this TextLine.

SetStructureType(StructElem)

Sets the structure element type, for example StructElem.P or StructElem.H1.

public TextLine SetStructureType(StructElem structureType)

Parameters

structureType StructElem

Returns

TextLine

SetText(string)

Sets the text.

public TextLine SetText(string text)

Parameters

text string

the text.

Returns

TextLine

this TextLine.

SetTextColor(int)

Sets the text color as a 0xRRGGBB value. Color.transparent leaves it unchanged.

public TextLine SetTextColor(int color)

Parameters

color int

Returns

TextLine

SetTextColor(float[])

Sets the text color from an array of red, green and blue values.

public TextLine SetTextColor(float[] rgbColor)

Parameters

rgbColor float[]

Returns

TextLine

SetTextRotation(int)

Sets the rotation of the text. A positive angle turns clockwise, as every rotation in PDFjet turns, and a negative angle counterclockwise.

public TextLine SetTextRotation(int degrees)

Parameters

degrees int

the angle in degrees.

Returns

TextLine

this TextLine.

SetURIAction(string)

Sets the URI for the "click text line" action.

public TextLine SetURIAction(string uri)

Parameters

uri string

the URI

Returns

TextLine

this TextLine.

SetURIActualText(string)

Sets the actual text of the link annotation.

public TextLine SetURIActualText(string uriActualText)

Parameters

uriActualText string

Returns

TextLine

SetURIAltDescription(string)

Sets the alternate description of the link annotation.

public TextLine SetURIAltDescription(string uriAltDescription)

Parameters

uriAltDescription string

Returns

TextLine

SetURILanguage(string)

Sets the language of the link annotation.

public TextLine SetURILanguage(string uriLanguage)

Parameters

uriLanguage string

Returns

TextLine

SetUnderline(bool)

Sets the underline variable. If the value of the underline variable is 'true' - the text is underlined.

public TextLine SetUnderline(bool underline)

Parameters

underline bool

the underline flag.

Returns

TextLine

this TextLine.

SetVerticalOffset(float)

Sets the vertical offset of the text, which replaces the offset of the script position until SetScriptPosition is called again.

public TextLine SetVerticalOffset(float verticalOffset)

Parameters

verticalOffset float

the vertical offset.

Returns

TextLine

this TextLine.