Table of Contents

Class TextColumn

Namespace
PDFjet.NET
Assembly
PDFjet.dll

A column of paragraphs, each a list of TextLine objects that can differ in font, size and color, aligned left, right, center or justified, with a line spacing, a paragraph spacing and an optional line between the paragraphs. It draws all of its paragraphs where it is placed, top down; to rotate a column, add it to a Container and rotate that.

Use a TextColumn for an article or a page of mixed text: bold or colored words in a paragraph, justified paragraphs, CJK paragraphs. Use a TextBlock for one run of text in one font, and a TextFrame when the text must continue from one frame to the next, across columns or pages. Please see Example_12, Example_22, Example_13 and Example_16.

public class TextColumn : IDrawable
Inheritance
TextColumn
Implements
Inherited Members

Constructors

TextColumn()

Create a text column object.

public TextColumn()

Methods

AddCJKParagraph(Font, string)

Adds a paragraph of Chinese, Japanese or Korean text to this text column, wrapped at any character to the width of the column.

public TextColumn AddCJKParagraph(Font font, string text)

Parameters

font Font

the font used by this paragraph.

text string

the text.

Returns

TextColumn

AddCJKParagraph(Font, string, string)

Adds a paragraph of Chinese, Japanese or Korean text to this text column, wrapped at any character to the width of the column, in the language given, which a screen reader reads it in.

public TextColumn AddCJKParagraph(Font font, string text, string language)

Parameters

font Font

the font used by this paragraph.

text string

the text.

language string

the language of the text, for example "zh-Hans", "ja" or "ko".

Returns

TextColumn

AddParagraph(Paragraph)

Adds a new paragraph to this text column.

public TextColumn AddParagraph(Paragraph paragraph)

Parameters

paragraph Paragraph

the new paragraph object.

Returns

TextColumn

this TextColumn object.

DrawOn(Page)

Draws this text column on the specified page. With no page nothing is drawn and the location of the next component is computed.

public float[] DrawOn(Page page)

Parameters

page Page

the page to draw this text column on.

Returns

float[]

the x and y coordinates of the bottom right corner of this text column.

GetHeight()

Returns the height of this text column.

public float GetHeight()

Returns

float

GetSize()

Returns dimension object containing the width and height of this component. Please see Example_22.

public Dimension GetSize()

Returns

Dimension

dimension object containing the width and height of this component.

GetWidth()

Returns the width of this text column.

public float GetWidth()

Returns

float

RemoveLastParagraph()

Removes the last paragraph added to this text column.

public TextColumn RemoveLastParagraph()

Returns

TextColumn

SetHeight(float)

Sets the height of this text column.

public TextColumn SetHeight(float h)

Parameters

h float

Returns

TextColumn

SetLineBetweenParagraphs(bool)

Sets the lineBetweenParagraphs private variable value. If the value is set to true - an empty line will be inserted between the current and next paragraphs.

public TextColumn SetLineBetweenParagraphs(bool lineBetweenParagraphs)

Parameters

lineBetweenParagraphs bool

the specified bool value.

Returns

TextColumn

this TextColumn object.

SetLineSpacing(float)

Sets the spacing between the lines in this text column.

public TextColumn SetLineSpacing(float lineSpacing)

Parameters

lineSpacing float

Returns

TextColumn

SetLocation(float, float)

Sets the location of this text column on the page.

public TextColumn SetLocation(float x, float y)

Parameters

x float

the x coordinate of the top left corner.

y float

the y coordinate of the top left corner.

Returns

TextColumn

SetParagraphSpacing(float)

Sets the space between paragraphs.

public TextColumn SetParagraphSpacing(float paragraphSpacing)

Parameters

paragraphSpacing float

Returns

TextColumn

SetTextAlignment(Alignment)

Sets the text alignment.

public TextColumn SetTextAlignment(Alignment alignment)

Parameters

alignment Alignment

the specified alignment code. Supported values: Alignment.LEFT, Alignment.RIGHT, Alignment.CENTER and Alignment.JUSTIFY

Returns

TextColumn

this TextColumn object.

SetWidth(float)

Sets the desired width of this text column.

public TextColumn SetWidth(float w)

Parameters

w float

the width of this text column.

Returns

TextColumn

this TextColumn object.