Table of Contents

Class RtfProperty

Namespace
iTextSharp.text.rtf.parser.properties
Assembly
iTextSharp.LGPLv2.Core.dll

RtfProperty handles document, paragraph, etc. property values @author Howard Shank (hgshank@yahoo.com) @since 2.0.8

public class RtfProperty
Inheritance
RtfProperty
Inherited Members

Constructors

RtfProperty()

public RtfProperty()

Fields

CHARACTER

public const string CHARACTER = "character."

Field Value

string

CHARACTER_BOLD

character properties

public const string CHARACTER_BOLD = "character.bold"

Field Value

string

CHARACTER_FONT

public const string CHARACTER_FONT = "character.font"

Field Value

string

CHARACTER_ITALIC

public const string CHARACTER_ITALIC = "character.italic"

Field Value

string

CHARACTER_SIZE

public const string CHARACTER_SIZE = "character.size"

Field Value

string

CHARACTER_STYLE

public const string CHARACTER_STYLE = "character.style"

Field Value

string

CHARACTER_UNDERLINE

public const string CHARACTER_UNDERLINE = "character.underline"

Field Value

string

COLOR

property groups

public const string COLOR = "color."

Field Value

string

COLOR_BG

public const string COLOR_BG = "color.bg"

Field Value

string

COLOR_FG

color properties

public const string COLOR_FG = "color.fg"

Field Value

string

DOCUMENT

public const string DOCUMENT = "document."

Field Value

string

DOCUMENT_DEFAULT_FONT_NUMER

public const string DOCUMENT_DEFAULT_FONT_NUMER = "document.defaultFontNumber"

Field Value

string

DOCUMENT_ENABLE_FACING_PAGES

public const string DOCUMENT_ENABLE_FACING_PAGES = "document.enableFacingPages"

Field Value

string

DOCUMENT_MARGIN_BOTTOM_TWIPS

public const string DOCUMENT_MARGIN_BOTTOM_TWIPS = "document.marginBottomTwips"

Field Value

string

DOCUMENT_MARGIN_LEFT_TWIPS

public const string DOCUMENT_MARGIN_LEFT_TWIPS = "document.marginLeftTwips"

Field Value

string

DOCUMENT_MARGIN_RIGHT_TWIPS

public const string DOCUMENT_MARGIN_RIGHT_TWIPS = "document.marginRightTwips"

Field Value

string

DOCUMENT_MARGIN_TOP_TWIPS

public const string DOCUMENT_MARGIN_TOP_TWIPS = "document.marginTopTwips"

Field Value

string

DOCUMENT_PAGE_HEIGHT_TWIPS

public const string DOCUMENT_PAGE_HEIGHT_TWIPS = "document.pageHeightTwips"

Field Value

string

DOCUMENT_PAGE_NUMBER_START

public const string DOCUMENT_PAGE_NUMBER_START = "document.pageNumberStart"

Field Value

string

DOCUMENT_PAGE_ORIENTATION

public const string DOCUMENT_PAGE_ORIENTATION = "document.pageOrientation"

Field Value

string

DOCUMENT_PAGE_WIDTH_TWIPS

public const string DOCUMENT_PAGE_WIDTH_TWIPS = "document.pageWidthTwips"

Field Value

string

JUSTIFY_CENTER

Justify center

public const int JUSTIFY_CENTER = 2

Field Value

int

JUSTIFY_FULL

Justify full

public const int JUSTIFY_FULL = 3

Field Value

int

JUSTIFY_LEFT

paragraph properties

public const int JUSTIFY_LEFT = 0

Field Value

int

JUSTIFY_RIGHT

Justify right

public const int JUSTIFY_RIGHT = 1

Field Value

int

OFF

public const int OFF = 0

Field Value

int

ON

public const int ON = 1

Field Value

int

PAGE_LANDSCAPE

Landscape orientation

public const string PAGE_LANDSCAPE = "1"

Field Value

string

PAGE_PORTRAIT

document properties

public const string PAGE_PORTRAIT = "0"

Field Value

string

PARAGRAPH

public const string PARAGRAPH = "paragraph."

Field Value

string

PARAGRAPH_BORDER

public const string PARAGRAPH_BORDER = "paragraph.border"

Field Value

string

PARAGRAPH_BORDER_BOTTOM

possible border settting

public const int PARAGRAPH_BORDER_BOTTOM = 1

Field Value

int

PARAGRAPH_BORDER_CELL

public const string PARAGRAPH_BORDER_CELL = "paragraph.borderCell"

Field Value

string

PARAGRAPH_BORDER_DIAGONAL_UL_LR

possible border settting

public const int PARAGRAPH_BORDER_DIAGONAL_UL_LR = 16

Field Value

int

PARAGRAPH_BORDER_DIAGONAL_UR_LL

possible border settting

public const int PARAGRAPH_BORDER_DIAGONAL_UR_LL = 32

Field Value

int

PARAGRAPH_BORDER_LEFT

possible border settting

public const int PARAGRAPH_BORDER_LEFT = 4

Field Value

int

PARAGRAPH_BORDER_NIL

possible border settting

public const int PARAGRAPH_BORDER_NIL = 0

Field Value

int

PARAGRAPH_BORDER_RIGHT

possible border settting

public const int PARAGRAPH_BORDER_RIGHT = 8

Field Value

int

PARAGRAPH_BORDER_TABLE_HORIZONTAL

possible border settting

public const int PARAGRAPH_BORDER_TABLE_HORIZONTAL = 64

Field Value

int

PARAGRAPH_BORDER_TABLE_VERTICAL

possible border settting

public const int PARAGRAPH_BORDER_TABLE_VERTICAL = 128

Field Value

int

PARAGRAPH_BORDER_TOP

possible border settting

public const int PARAGRAPH_BORDER_TOP = 2

Field Value

int

PARAGRAPH_INDENT_FIRST_LINE

public const string PARAGRAPH_INDENT_FIRST_LINE = "paragraph.indentFirstLine"

Field Value

string

PARAGRAPH_INDENT_LEFT

public const string PARAGRAPH_INDENT_LEFT = "paragraph.indentLeft"

Field Value

string

PARAGRAPH_INDENT_RIGHT

public const string PARAGRAPH_INDENT_RIGHT = "paragraph.indentRight"

Field Value

string

PARAGRAPH_JUSTIFICATION

public const string PARAGRAPH_JUSTIFICATION = "paragraph.justification"

Field Value

string

PGN_DECIMAL

section properties

public const int PGN_DECIMAL = 0

Field Value

int

PGN_LETTER_LOWERCASE

Lowercase Letter

public const int PGN_LETTER_LOWERCASE = 4

Field Value

int

PGN_LETTER_UPPERCASE

Uppercase Letter

public const int PGN_LETTER_UPPERCASE = 3

Field Value

int

PGN_ROMAN_NUMERAL_LOWERCASE

Lowercase Roman Numeral

public const int PGN_ROMAN_NUMERAL_LOWERCASE = 2

Field Value

int

PGN_ROMAN_NUMERAL_UPPERCASE

Uppercase Roman Numeral

public const int PGN_ROMAN_NUMERAL_UPPERCASE = 1

Field Value

int

Properties

Properties for this RtfProperty object

protected INullValueDictionary<string, object> Properties

Field Value

INullValueDictionary<string, object>

SBK_COLUMN

Section Break Column break

public const int SBK_COLUMN = 1

Field Value

int

SBK_EVEN

Section Break Even page break

public const int SBK_EVEN = 2

Field Value

int

SBK_NONE

Section Break None

public const int SBK_NONE = 0

Field Value

int

SBK_ODD

Section Break Odd page break

public const int SBK_ODD = 3

Field Value

int

SBK_PAGE

Section Break Page break

public const int SBK_PAGE = 4

Field Value

int

SECTION

public const string SECTION = "section."

Field Value

string

SECTION_BREAK_TYPE

public const string SECTION_BREAK_TYPE = "section.SectionBreakType"

Field Value

string

SECTION_NUMBER_OF_COLUMNS

public const string SECTION_NUMBER_OF_COLUMNS = "section.numberOfColumns"

Field Value

string

SECTION_PAGE_NUMBER_FORMAT

public const string SECTION_PAGE_NUMBER_FORMAT = "section.pageNumberFormat"

Field Value

string

SECTION_PAGE_NUMBER_POSITION_X

public const string SECTION_PAGE_NUMBER_POSITION_X = "section.pageNumberPositionX"

Field Value

string

SECTION_PAGE_NUMBER_POSITION_Y

public const string SECTION_PAGE_NUMBER_POSITION_Y = "section.pageNumberPositionY"

Field Value

string

Methods

AddRtfPropertyListener(IRtfPropertyListener)

Adds a RtfPropertyListener to the RtfProperty . the new RtfPropertyListener.

public void AddRtfPropertyListener(IRtfPropertyListener listener)

Parameters

listener IRtfPropertyListener

AfterChange(string)

public void AfterChange(string propertyName)

Parameters

propertyName string

BeforeChange(string)

public void BeforeChange(string propertyName)

Parameters

propertyName string

GetProperties(string)

Get a group of properties.

public INullValueDictionary<string, object> GetProperties(string propertyGroup)

Parameters

propertyGroup string

The group name to obtain.

Returns

INullValueDictionary<string, object>

Properties object with requested values.

GetProperty(string)

Get the value of the property identified by the parameter.

public object GetProperty(string propertyName)

Parameters

propertyName string

String containing the property name to get

Returns

object

Property Object requested or null if not found in map.

IsModified()

public bool IsModified()

Returns

bool

the modified

IsModifiedCharacter()

public bool IsModifiedCharacter()

Returns

bool

the modifiedCharacter

IsModifiedDocument()

public bool IsModifiedDocument()

Returns

bool

the modifiedDocument

IsModifiedParagraph()

public bool IsModifiedParagraph()

Returns

bool

the modifiedParagraph

IsModifiedSection()

public bool IsModifiedSection()

Returns

bool

the modifiedSection

RemoveRtfPropertyListener(IRtfPropertyListener)

Removes a RtfPropertyListener from the RtfProperty . the new RtfPropertyListener.

public void RemoveRtfPropertyListener(IRtfPropertyListener listener)

Parameters

listener IRtfPropertyListener

SetModified(string, bool)

public void SetModified(string propertyName, bool modified)

Parameters

propertyName string

the propertyName that is modified

modified bool

the modified to set

SetModifiedCharacter(bool)

public void SetModifiedCharacter(bool modifiedCharacter)

Parameters

modifiedCharacter bool

the modifiedCharacter to set

SetModifiedDocument(bool)

public void SetModifiedDocument(bool modifiedDocument)

Parameters

modifiedDocument bool

the modifiedDocument to set

SetModifiedParagraph(bool)

public void SetModifiedParagraph(bool modifiedParagraph)

Parameters

modifiedParagraph bool

the modifiedParagraph to set

SetModifiedSection(bool)

public void SetModifiedSection(bool modifiedSection)

Parameters

modifiedSection bool

the modifiedSection to set

SetProperty(RtfCtrlWordData)

Set the value of the property identified by the parameter.

public bool SetProperty(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

The controlword with the name to set

Returns

bool

true for handled or false if propertyName or propertyValue is null

SetToDefault()

Set all property objects to default values. @since 2.0.8

public void SetToDefault()

SetToDefault(string)

Set individual property group to default values. @since 2.0.8

public void SetToDefault(string propertyGroup)

Parameters

propertyGroup string

String name of the property group to set to default.

ToggleProperty(RtfCtrlWordData)

Toggle the value of the property identified by the RtfCtrlWordData.specialHandler parameter. Toggle values are assumed to be integer values per the RTF spec with a value of 0=off or 1=on.

public bool ToggleProperty(RtfCtrlWordData ctrlWordData)

Parameters

ctrlWordData RtfCtrlWordData

The property name to set

Returns

bool

true for handled or false if propertyName is null or blank