ITextParagraphFormat ITextParagraphFormat ITextParagraphFormat ITextParagraphFormat Interface

Definition

Defines the default paragraph formatting attributes of a document, or the current paragraph formatting attributes of a text range.

public : interface ITextParagraphFormat
public interface ITextParagraphFormat
Public Interface ITextParagraphFormat
// You can't instantiate an interface directly in JavaScript. You can use objects that implement the interface, however.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Alignment Alignment Alignment Alignment

Gets or sets the paragraph alignment.

public : ParagraphAlignment Alignment { get; set; }
public ParagraphAlignment Alignment { get; set; }
Public ReadWrite Property Alignment As ParagraphAlignment
var paragraphAlignment = iTextParagraphFormat.alignment;
iTextParagraphFormat.alignment = paragraphAlignment;

FirstLineIndent FirstLineIndent FirstLineIndent FirstLineIndent

Gets the amount used to indent the first line of a paragraph relative to the left indent.

public : float FirstLineIndent { get; }
public float FirstLineIndent { get; }
Public ReadOnly Property FirstLineIndent As float
var float = iTextParagraphFormat.firstLineIndent;
Value
float float float float

The first line indentation amount, in floating-point points.

Remarks

The left indent applies to all lines of the paragraph except the first line.

See Also

KeepTogether KeepTogether KeepTogether KeepTogether

Gets or sets whether page breaks are allowed in paragraphs.

public : FormatEffect KeepTogether { get; set; }
public FormatEffect KeepTogether { get; set; }
Public ReadWrite Property KeepTogether As FormatEffect
var formatEffect = iTextParagraphFormat.keepTogether;
iTextParagraphFormat.keepTogether = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

A value that indicates whether page breaks are allowed.

KeepWithNext KeepWithNext KeepWithNext KeepWithNext

Gets or sets whether page breaks are allowed between paragraphs in a range.

public : FormatEffect KeepWithNext { get; set; }
public FormatEffect KeepWithNext { get; set; }
Public ReadWrite Property KeepWithNext As FormatEffect
var formatEffect = iTextParagraphFormat.keepWithNext;
iTextParagraphFormat.keepWithNext = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

The value that indicates whether page breaks are allowed.

LeftIndent LeftIndent LeftIndent LeftIndent

Gets the amount used to indent all lines except the first line of a paragraph.

public : float LeftIndent { get; }
public float LeftIndent { get; }
Public ReadOnly Property LeftIndent As float
var float = iTextParagraphFormat.leftIndent;
Value
float float float float

The amount of left indentation, in floating-point points. Indentation is relative to the left margin.

See Also

LineSpacing LineSpacing LineSpacing LineSpacing

Gets the paragraph line-spacing value.

public : float LineSpacing { get; }
public float LineSpacing { get; }
Public ReadOnly Property LineSpacing As float
var float = iTextParagraphFormat.lineSpacing;
Value
float float float float

The line spacing value. The meaning depends on the value of the LineSpacingRule property. The line spacing value is in floating-point points except when the line-spacing rule is Multiple or Percent.

See Also

LineSpacingRule LineSpacingRule LineSpacingRule LineSpacingRule

Gets the paragraph line-spacing rule.

public : LineSpacingRule LineSpacingRule { get; }
public LineSpacingRule LineSpacingRule { get; }
Public ReadOnly Property LineSpacingRule As LineSpacingRule
var lineSpacingRule = iTextParagraphFormat.lineSpacingRule;
Value
LineSpacingRule LineSpacingRule LineSpacingRule LineSpacingRule

The paragraph line-spacing rule.

See Also

ListAlignment ListAlignment ListAlignment ListAlignment

Gets or sets the alignment to use for bulleted and numbered lists.

public : MarkerAlignment ListAlignment { get; set; }
public MarkerAlignment ListAlignment { get; set; }
Public ReadWrite Property ListAlignment As MarkerAlignment
var markerAlignment = iTextParagraphFormat.listAlignment;
iTextParagraphFormat.listAlignment = markerAlignment;
Value
MarkerAlignment MarkerAlignment MarkerAlignment MarkerAlignment

The alignment for bulleted and numbered lists.

ListLevelIndex ListLevelIndex ListLevelIndex ListLevelIndex

Gets or sets the list level index used with paragraphs.

public : int ListLevelIndex { get; set; }
public int ListLevelIndex { get; set; }
Public ReadWrite Property ListLevelIndex As int
var int = iTextParagraphFormat.listLevelIndex;
iTextParagraphFormat.listLevelIndex = int;
Value
int int int int

The list level index. It can be a value of 0 or higher, as described in the following table.

ValueMeaning
0No list.
1First-level (outermost) list.
2Second-level (nested) list. This is nested under a level 1 list item.
3Third-level (nested) list. This is nested under a level 2 list item.
And so onNesting continues similarly.

Up to three levels are common in HTML documents.

Remarks

Setting the list level index doesn't automatically change a list's indentation and other paragraph properties.

ListStart ListStart ListStart ListStart

Gets or sets the starting value or code of a list numbering sequence.

public : int ListStart { get; set; }
public int ListStart { get; set; }
Public ReadWrite Property ListStart As int
var int = iTextParagraphFormat.listStart;
iTextParagraphFormat.listStart = int;
Value
int int int int

The starting value or code of a list numbering sequence.

ListStyle ListStyle ListStyle ListStyle

Gets or sets the style used to mark the item paragraphs in a list.

public : MarkerStyle ListStyle { get; set; }
public MarkerStyle ListStyle { get; set; }
Public ReadWrite Property ListStyle As MarkerStyle
var markerStyle = iTextParagraphFormat.listStyle;
iTextParagraphFormat.listStyle = markerStyle;
Value
MarkerStyle MarkerStyle MarkerStyle MarkerStyle

The style used to mark the item paragraphs.

See Also

ListTab ListTab ListTab ListTab

Gets or sets the list tab setting, which is the distance between the first indent and the start of the text on the first line.

public : float ListTab { get; set; }
public float ListTab { get; set; }
Public ReadWrite Property ListTab As float
var float = iTextParagraphFormat.listTab;
iTextParagraphFormat.listTab = float;
Value
float float float float

The list tab setting.

Remarks

Numbered or bulleted text is left-justified, centered, or right-justified at the first-line indent value. Use ITextParagraphFormat.ListAlignment to determine the text position.

See Also

ListType ListType ListType ListType

Gets or sets the kind of characters used to mark the item paragraphs in a list.

public : MarkerType ListType { get; set; }
public MarkerType ListType { get; set; }
Public ReadWrite Property ListType As MarkerType
var markerType = iTextParagraphFormat.listType;
iTextParagraphFormat.listType = markerType;
Value
MarkerType MarkerType MarkerType MarkerType

The kind of characters used to mark the item paragraphs.

See Also

NoLineNumber NoLineNumber NoLineNumber NoLineNumber

Gets or sets whether paragraph numbering is suppressed.

public : FormatEffect NoLineNumber { get; set; }
public FormatEffect NoLineNumber { get; set; }
Public ReadWrite Property NoLineNumber As FormatEffect
var formatEffect = iTextParagraphFormat.noLineNumber;
iTextParagraphFormat.noLineNumber = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

A value that indicates whether line numbering is suppressed.

Remarks

When the paragraphs are numbered, the number appears on the first line of the paragraph.

PageBreakBefore PageBreakBefore PageBreakBefore PageBreakBefore

Gets or sets whether there is a page break before a paragraph.

public : FormatEffect PageBreakBefore { get; set; }
public FormatEffect PageBreakBefore { get; set; }
Public ReadWrite Property PageBreakBefore As FormatEffect
var formatEffect = iTextParagraphFormat.pageBreakBefore;
iTextParagraphFormat.pageBreakBefore = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

A value that indicates whether there is page break.

RightIndent RightIndent RightIndent RightIndent

Gets or sets the right margin of a paragraph.

public : float RightIndent { get; set; }
public float RightIndent { get; set; }
Public ReadWrite Property RightIndent As float
var float = iTextParagraphFormat.rightIndent;
iTextParagraphFormat.rightIndent = float;
Value
float float float float

The size of the right margin, in floating-point points.

See Also

RightToLeft RightToLeft RightToLeft RightToLeft

Gets or sets whether the paragraph uses right-to-left formatting.

public : FormatEffect RightToLeft { get; set; }
public FormatEffect RightToLeft { get; set; }
Public ReadWrite Property RightToLeft As FormatEffect
var formatEffect = iTextParagraphFormat.rightToLeft;
iTextParagraphFormat.rightToLeft = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

A value that indicates whether the paragraph uses right-to-left formatting.

SpaceAfter SpaceAfter SpaceAfter SpaceAfter

Gets or sets the amount of vertical space that follows a paragraph.

public : float SpaceAfter { get; set; }
public float SpaceAfter { get; set; }
Public ReadWrite Property SpaceAfter As float
var float = iTextParagraphFormat.spaceAfter;
iTextParagraphFormat.spaceAfter = float;
Value
float float float float

The amount of vertical space, in floating-point points.

See Also

SpaceBefore SpaceBefore SpaceBefore SpaceBefore

Gets or sets the amount of vertical space above a paragraph.

public : float SpaceBefore { get; set; }
public float SpaceBefore { get; set; }
Public ReadWrite Property SpaceBefore As float
var float = iTextParagraphFormat.spaceBefore;
iTextParagraphFormat.spaceBefore = float;
Value
float float float float

The amount of vertical space, in floating-point points.

See Also

Style Style Style Style

Gets or sets the paragraph style.

public : ParagraphStyle Style { get; set; }
public ParagraphStyle Style { get; set; }
Public ReadWrite Property Style As ParagraphStyle
var paragraphStyle = iTextParagraphFormat.style;
iTextParagraphFormat.style = paragraphStyle;

TabCount TabCount TabCount TabCount

Retrieves the tab count.

public : int TabCount { get; }
public int TabCount { get; }
Public ReadOnly Property TabCount As int
var int = iTextParagraphFormat.tabCount;
Value
int int int int

The tab count.

Remarks

The tab count of a new instance can be nonzero; for example, Microsoft Word stories begin with no explicit tabs defined, while rich edit instances start with a single explicit tab. To ensure there are no explicit tabs (that is, to set the tab count to zero), call the ITextParagraphFormat.ClearAllTabs method.

See Also

WidowControl WidowControl WidowControl WidowControl

Gets or sets whether widow and orphan suppression is on or off.

public : FormatEffect WidowControl { get; set; }
public FormatEffect WidowControl { get; set; }
Public ReadWrite Property WidowControl As FormatEffect
var formatEffect = iTextParagraphFormat.widowControl;
iTextParagraphFormat.widowControl = formatEffect;
Value
FormatEffect FormatEffect FormatEffect FormatEffect

The state of window and orphan suppression.

Remarks

A widow is created when the last line of a paragraph is printed by itself at the top of a page. An orphan is when the first line of a paragraph is printed by itself at the bottom of a page.

See Also

Methods

AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader) AddTab(Single, TabAlignment, TabLeader)

Adds a new tab at the specified position.

public : void AddTab(float position, TabAlignment align, TabLeader leader)
public void AddTab(Single position, TabAlignment align, TabLeader leader)
Public Function AddTab(position As Single, align As TabAlignment, leader As TabLeader) As void
iTextParagraphFormat.addTab(position, align, leader);
Parameters
position
float Single Single Single

The position of the new tab, in floating-point points relative to the left side of the page for left-to-right paragraphs, or the right side of the page for right-to-left paragraphs. A maximum of 63 tabs are allowed. Tabs beyond the page are ignored. Negative tabs are not valid.

align
TabAlignment TabAlignment TabAlignment TabAlignment

The alignment option for the tab position.

leader
TabLeader TabLeader TabLeader TabLeader

The character used to fill the space taken by a tab character.

See Also

ClearAllTabs() ClearAllTabs() ClearAllTabs() ClearAllTabs()

DeleteTab(Single) DeleteTab(Single) DeleteTab(Single) DeleteTab(Single)

Deletes the tab at the specified position.

public : void DeleteTab(float position)
public void DeleteTab(Single position)
Public Function DeleteTab(position As Single) As void
iTextParagraphFormat.deleteTab(position);
Parameters
position
float Single Single Single

The position of the tab to delete, in floating-point points.

See Also

GetClone() GetClone() GetClone() GetClone()

Creates a new object that is identical to this paragraph format object.

public : ITextParagraphFormat GetClone()
public ITextParagraphFormat GetClone()
Public Function GetClone() As ITextParagraphFormat
var iTextParagraphFormat = iTextParagraphFormat.getClone();
Returns
See Also

GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader) GetTab(Int32, Single, TabAlignment, TabLeader)

Retrieves information about the specified tab.

public : void GetTab(int index, float position, TabAlignment align, TabLeader leader)
public void GetTab(Int32 index, Single position, TabAlignment align, TabLeader leader)
Public Function GetTab(index As Int32, position As Single, align As TabAlignment, leader As TabLeader) As void
iTextParagraphFormat.getTab(index, position, align, leader);
Parameters
index
int Int32 Int32 Int32

The zero-based index of the tab to retrieve.

position
float Single Single Single

The tab's position, in floating-point points. This parameter is zero if the tab does not exist.

align
TabAlignment TabAlignment TabAlignment TabAlignment

The alignment option for the tab position.

leader
TabLeader TabLeader TabLeader TabLeader

The character used to fill the space taken by a tab character.

See Also

IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat) IsEqual(ITextParagraphFormat)

Determines whether this paragraph format object has the same properties as the specified paragraph format object.

public : Platform::Boolean IsEqual(ITextParagraphFormat format)
public bool IsEqual(ITextParagraphFormat format)
Public Function IsEqual(format As ITextParagraphFormat) As bool
var bool = iTextParagraphFormat.isEqual(format);
Parameters
format
ITextParagraphFormat ITextParagraphFormat ITextParagraphFormat ITextParagraphFormat

The paragraph format object to compare against.

Returns
Platform::Boolean bool bool bool

True if the objects have the same properties, or false if they don't.

SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat) SetClone(ITextParagraphFormat)

Sets the paragraph formatting by copying another paragraph formatting object.

public : void SetClone(ITextParagraphFormat format)
public void SetClone(ITextParagraphFormat format)
Public Function SetClone(format As ITextParagraphFormat) As void
iTextParagraphFormat.setClone(format);
Parameters

Remarks

Any paragraph formatting values that are undefined in value have no effect.

See Also

SetIndents(Single, Single, Single) SetIndents(Single, Single, Single) SetIndents(Single, Single, Single) SetIndents(Single, Single, Single)

Sets the first-line indent, the left indent, and the right indent for a paragraph.

public : void SetIndents(float start, float left, float right)
public void SetIndents(Single start, Single left, Single right)
Public Function SetIndents(start As Single, left As Single, right As Single) As void
iTextParagraphFormat.setIndents(start, left, right);
Parameters
start
float Single Single Single

The indent of the first line in a paragraph, relative to the left indent. The value is in floating-point points and can be positive or negative.

left
float Single Single Single

The left indent of all lines except the first line in a paragraph, relative to the left margin. The value is in floating-point points and can be positive or negative.

right
float Single Single Single

The right indent of all lines in a paragraph, relative to the right margin. The value is in floating-point points and can be positive or negative. This value is optional.

Remarks

Line indents cannot position text in the margins. If the first-line indent is set to a negative value, for an outdented paragraph, while the left indent is zero, the first-line indent is reset to zero. To avoid this problem while retaining property sets, explicitly set the first-line indent value equal to zero, and then call SetIndents to set a nonnegative, left-indent value and set the desired first-line indent.

See Also

SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single) SetLineSpacing(LineSpacingRule, Single)

Sets the paragraph line-spacing rule and the amount of line spacing for a paragraph.

public : void SetLineSpacing(LineSpacingRule rule, float spacing)
public void SetLineSpacing(LineSpacingRule rule, Single spacing)
Public Function SetLineSpacing(rule As LineSpacingRule, spacing As Single) As void
iTextParagraphFormat.setLineSpacing(rule, spacing);
Parameters
spacing
float Single Single Single

The new line spacing amount. If the line-spacing rule interprets the spacing value as a linear dimension, spacing is given in floating-point points.

Remarks

Because the line-spacing rule and line spacing work together, they must be set together.

See Also