Table of Contents

Class PdfLine

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

PdfLine defines an array with PdfChunk -objects that fit into 1 line.

public class PdfLine
Inheritance
PdfLine
Inherited Members

Fields

Alignment

The alignment of the line.

protected int Alignment

Field Value

int

IsRtl

protected bool IsRtl

Field Value

bool

Left

The left indentation of the line.

protected float Left

Field Value

float

Line

membervariables

protected IList<PdfChunk> Line

Field Value

IList<PdfChunk>

SymbolIndent

The listsymbol (if necessary).

protected float SymbolIndent

Field Value

float

Width

The width of the line.

protected float Width

Field Value

float

height

The heigth of the line.

protected float height

Field Value

float

listSymbol

The listsymbol (if necessary).

protected Chunk listSymbol

Field Value

Chunk

newlineSplit

true if the chunk splitting was caused by a newline.

protected bool newlineSplit

Field Value

bool

originalWidth

The original width.

protected float originalWidth

Field Value

float

Properties

Ascender

Gets the maximum size of the ascender for all the fonts used in this line.

public float Ascender { get; }

Property Value

float

maximum size of all the ascenders used in this line

Descender

Gets the biggest descender for all the fonts used in this line. Note that this is a negative number.

public float Descender { get; }

Property Value

float

maximum size of all the ascenders used in this line

LastStrokeChunk

Gets the index of the last PdfChunk with metric attributes

public int LastStrokeChunk { get; }

Property Value

int

the last PdfChunk with metric attributes

ListIndent

Return the indentation needed to show the listsymbol.

public float ListIndent { get; }

Property Value

float

a value

ListItem

Sets the listsymbol of this line. This is only necessary for the first line of a ListItem .

public ListItem ListItem { set; }

Property Value

ListItem

ListSymbol

Returns the listsymbol of this line.

public Chunk ListSymbol { get; }

Property Value

Chunk

a PdfChunk if the line has a listsymbol; null otherwise

NewlineSplit

Checks if a newline caused the line split.

public bool NewlineSplit { get; }

Property Value

bool

true if a newline caused the line split

OriginalWidth

Gets the original width of the line.

public float OriginalWidth { get; }

Property Value

float

the original width of the line

Size

methods to retrieve information

public int Size { get; }

Property Value

int

a value

Methods

GetChunk(int)

Gets a PdfChunk by index.

public PdfChunk GetChunk(int idx)

Parameters

idx int

the index

Returns

PdfChunk

the PdfChunk or null if beyond the array

GetEnumerator()

Returns an iterator of PdfChunk s.

public IEnumerator<PdfChunk> GetEnumerator()

Returns

IEnumerator<PdfChunk>

an Iterator

GetLineLengthUtf32()

public int GetLineLengthUtf32()

Returns

int

GetWidthCorrected(float, float)

public float GetWidthCorrected(float charSpacing, float wordSpacing)

Parameters

charSpacing float
wordSpacing float

Returns

float

HasToBeJustified()

Checks if this line has to be justified.

public bool HasToBeJustified()

Returns

bool

true if the alignment equals ALIGN_JUSTIFIED and there is some width left.

ResetAlignment()

Resets the alignment of this line. The alignment of the last line of for instance a Paragraph that has to be justified, has to be reset to ALIGN_LEFT.

public void ResetAlignment()

ToString()

Get the string representation of what is in this line.

public override string ToString()

Returns

string

a string