Skip to main content
Skip table of contents

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
TypeNameMethods
intAlignment
Get/set the alignment of this paragraph.
get, set
floatExtraParagraphSpaceget, set
floatFirstLineIndentget, set
AccessibleElementIdIDget, set
floatIndentationLeft
Get/set the indentation of this paragraph on the left side.
get, set
floatIndentationRight
Get/set the indentation of this paragraph on the right side.
get, set
boolIsInlineget
boolKeepTogether
Set/get if this paragraph has to be kept together on one page.
get, set
floatPaddingTopget, set
PdfNameRoleget, set
floatSpacingAfterget, set
floatSpacingBeforeget, set
intType
Gets the type of the text element.
get

Methods

Public methods
ReturnsName
boolAdd(IElement o)
Adds an Object to the Paragraph.
IList<IElement>BreakUp()
ParagraphCloneShallow(bool spacingBefore)
PdfObjectGetAccessibleAttribute(PdfName key)
Dictionary<PdfName, PdfObject>GetAccessibleAttributes()
voidSetAccessibleAttribute(PdfName key, PdfObject value)
IList<IElement>breakUp()
ParagraphcloneShallow(bool spacingBefore)
Protected methods
ReturnsName
voidPopulateProperties(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
TypeNameDescription
floatleadingthe leading
Summary

Constructs a Paragraph with a certain leading.

Paragraph [3/9]

Source code

public Paragraph(Chunk chunk)
Arguments
TypeNameDescription
Chunkchunka Chunk
Summary

Constructs a Paragraph with a certain Chunk.

Paragraph [4/9]

Source code

public Paragraph(float leading, Chunk chunk)
Arguments
TypeNameDescription
floatleadingthe leading
Chunkchunka Chunk
Summary

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

Paragraph [5/9]

Source code

public Paragraph(string str)
Arguments
TypeNameDescription
stringstra string
Summary

Constructs a Paragraph with a certain string.

Paragraph [6/9]

Source code

public Paragraph(string str, Font font)
Arguments
TypeNameDescription
stringstra string
Fontfonta 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
TypeNameDescription
floatleadingthe leading
stringstra 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
TypeNameDescription
floatleadingthe leading
stringstra string
Fontfonta Font
Summary

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

Paragraph [9/9]

Source code

public Paragraph(Phrase phrase)
Arguments
TypeNameDescription
Phrasephrasea Phrase
Summary

Constructs a Paragraph with a certain Phrase.

Methods

CloneShallow

Source code

public virtual Paragraph CloneShallow(bool spacingBefore)
Arguments
TypeNameDescription
boolspacingBefore
PopulateProperties

Source code

protected void PopulateProperties(Paragraph copy, bool spacingBefore)
Arguments
TypeNameDescription
Paragraphcopy
boolspacingBefore
cloneShallow

Source code

public virtual Paragraph cloneShallow(bool spacingBefore)
Arguments
TypeNameDescription
boolspacingBefore
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
TypeNameDescription
IElementothe object to add
Summary

Adds an Object to the Paragraph.

Returns

a bool

GetAccessibleAttribute

Source code

public virtual PdfObject GetAccessibleAttribute(PdfName key)
Arguments
TypeNameDescription
PdfNamekey
SetAccessibleAttribute

Source code

public virtual void SetAccessibleAttribute(PdfName key, PdfObject value)
Arguments
TypeNameDescription
PdfNamekey
PdfObjectvalue
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

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.