iText 5

Paragraph

Paragraph Public class

Description

A Paragraph is a series of Chunks and/or Phrases.

Diagram

flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph iTextSharp.text iTextSharp.text.Paragraph[[Paragraph]] iTextSharp.text.Phrase[[Phrase]] end subgraph iTextSharp.text.api iTextSharp.text.api.IIndentable[[IIndentable]] class iTextSharp.text.api.IIndentable interfaceStyle; iTextSharp.text.api.ISpaceable[[ISpaceable]] class iTextSharp.text.api.ISpaceable interfaceStyle; end subgraph iTextSharp.text.pdf.interfaces iTextSharp.text.pdf.interfaces.IAccessibleElement[[IAccessibleElement]] class iTextSharp.text.pdf.interfaces.IAccessibleElement interfaceStyle; end iTextSharp.text.api.IIndentable --> iTextSharp.text.Paragraph iTextSharp.text.api.ISpaceable --> iTextSharp.text.Paragraph iTextSharp.text.pdf.interfaces.IAccessibleElement --> iTextSharp.text.Paragraph iTextSharp.text.Phrase --> iTextSharp.text.Paragraph

Members

Properties

Public properties

Type

Name

Methods

int

Alignment


Get/set the alignment of this paragraph.

get, set

float

ExtraParagraphSpace

get, set

float

FirstLineIndent

get, set

AccessibleElementId

ID

get, set

float

IndentationLeft


Get/set the indentation of this paragraph on the left side.

get, set

float

IndentationRight


Get/set the indentation of this paragraph on the right side.

get, set

bool

IsInline

get

bool

KeepTogether


Set/get if this paragraph has to be kept together on one page.

get, set

float

PaddingTop

get, set

PdfName

Role

get, set

float

SpacingAfter

get, set

float

SpacingBefore

get, set

int

Type


Gets the type of the text element.

get

Methods

Public methods
Protected methods

Returns

Name

void

PopulateProperties

(

Paragraph

copy, bool spacingBefore)

Details

Summary

A Paragraph is a series of Chunks and/or Phrases.

Remarks

A Paragraph has the same qualities of a Phrase, but also some additional layout-parameters: the indentation the alignment of the text

Example

Paragraph p = new Paragraph("This is a paragraph", FontFactory.GetFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new BaseColor(0, 0, 255)));

Inheritance

Constructors

Paragraph [1/9]

Source code

public Paragraph()

Summary

Constructs a Paragraph.

Paragraph [2/9]

Source code

public Paragraph(float leading)

Arguments

Type

Name

Description

float

leading

the leading

Summary

Constructs a Paragraph with a certain leading.

Paragraph [3/9]

Source code

public Paragraph(Chunk chunk)

Arguments

Type

Name

Description

Chunk

chunk

a Chunk

Summary

Constructs a Paragraph with a certain Chunk.

Paragraph [4/9]

Source code

public Paragraph(float leading, Chunk chunk)

Arguments

Type

Name

Description

float

leading

the leading

Chunk

chunk

a Chunk

Summary

Constructs a Paragraph with a certain Chunk and a certain leading.

Paragraph [5/9]

Source code

public Paragraph(string str)

Arguments

Type

Name

Description

string

str

a string

Summary

Constructs a Paragraph with a certain string.

Paragraph [6/9]

Source code

public Paragraph(string str, Font font)

Arguments

Type

Name

Description

string

str

a string

Font

font

a Font

Summary

Constructs a Paragraph with a certain string and a certain Font.

Paragraph [7/9]

Source code

public Paragraph(float leading, string str)

Arguments

Type

Name

Description

float

leading

the leading

string

str

a string

Summary

Constructs a Paragraph with a certain string and a certain leading.

Paragraph [8/9]

Source code

public Paragraph(float leading, string str, Font font)

Arguments

Type

Name

Description

float

leading

the leading

string

str

a string

Font

font

a Font

Summary

Constructs a Paragraph with a certain leading, string and Font.

Paragraph [9/9]

Source code

public Paragraph(Phrase phrase)

Arguments

Type

Name

Description

Phrase

phrase

a Phrase

Summary

Constructs a Paragraph with a certain Phrase.

Methods

CloneShallow

Source code

public virtual Paragraph CloneShallow(bool spacingBefore)

Arguments

Type

Name

Description

bool

spacingBefore

PopulateProperties

Source code

protected void PopulateProperties(Paragraph copy, bool spacingBefore)

Arguments

Type

Name

Description

Paragraph

copy

bool

spacingBefore

cloneShallow

Source code

public virtual Paragraph cloneShallow(bool spacingBefore)

Arguments

Type

Name

Description

bool

spacingBefore

BreakUp

Source code

public virtual IList<IElement> BreakUp()

breakUp

Source code

public IList<IElement> breakUp()

Add

Source code

public override bool Add(IElement o)

Arguments

Type

Name

Description

IElement

o

the object to add

Summary

Adds an Object to the Paragraph.

Returns

a bool

GetAccessibleAttribute

Source code

public virtual PdfObject GetAccessibleAttribute(PdfName key)

Arguments

Type

Name

Description

PdfName

key

SetAccessibleAttribute

Source code

public virtual void SetAccessibleAttribute(PdfName key, PdfObject value)

Arguments

Type

Name

Description

PdfName

key

PdfObject

value

GetAccessibleAttributes

Source code

public virtual Dictionary<PdfName, PdfObject> GetAccessibleAttributes()

Properties

Type

public override int Type { get; }

Summary

Gets the type of the text element.

Value

a type

Alignment

public virtual int Alignment { get; set; }

Summary

Get/set the alignment of this paragraph.

Value

a integer

IndentationLeft

public virtual float IndentationLeft { get; set; }

Summary

Get/set the indentation of this paragraph on the left side.

Value

a float

IndentationRight

public virtual float IndentationRight { get; set; }

Summary

Get/set the indentation of this paragraph on the right side.

Value

a float

SpacingBefore

public virtual float SpacingBefore { get; set; }

SpacingAfter

public virtual float SpacingAfter { get; set; }

KeepTogether

public virtual bool KeepTogether { get; set; }

Summary

Set/get if this paragraph has to be kept together on one page.

Value

a bool

FirstLineIndent

public virtual float FirstLineIndent { get; set; }

ExtraParagraphSpace

public virtual float ExtraParagraphSpace { get; set; }

Role

public virtual PdfName Role { get; set; }

ID

public virtual AccessibleElementId ID { get; set; }

IsInline

public virtual bool IsInline { get; }

PaddingTop

public virtual float PaddingTop { get; set; }

Generated with ModularDoc