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
CHARACTER_BOLD
character properties
public const string CHARACTER_BOLD = "character.bold"
Field Value
CHARACTER_FONT
public const string CHARACTER_FONT = "character.font"
Field Value
CHARACTER_ITALIC
public const string CHARACTER_ITALIC = "character.italic"
Field Value
CHARACTER_SIZE
public const string CHARACTER_SIZE = "character.size"
Field Value
CHARACTER_STYLE
public const string CHARACTER_STYLE = "character.style"
Field Value
CHARACTER_UNDERLINE
public const string CHARACTER_UNDERLINE = "character.underline"
Field Value
COLOR
property groups
public const string COLOR = "color."
Field Value
COLOR_BG
public const string COLOR_BG = "color.bg"
Field Value
COLOR_FG
color properties
public const string COLOR_FG = "color.fg"
Field Value
DOCUMENT
public const string DOCUMENT = "document."
Field Value
DOCUMENT_DEFAULT_FONT_NUMER
public const string DOCUMENT_DEFAULT_FONT_NUMER = "document.defaultFontNumber"
Field Value
DOCUMENT_ENABLE_FACING_PAGES
public const string DOCUMENT_ENABLE_FACING_PAGES = "document.enableFacingPages"
Field Value
DOCUMENT_MARGIN_BOTTOM_TWIPS
public const string DOCUMENT_MARGIN_BOTTOM_TWIPS = "document.marginBottomTwips"
Field Value
DOCUMENT_MARGIN_LEFT_TWIPS
public const string DOCUMENT_MARGIN_LEFT_TWIPS = "document.marginLeftTwips"
Field Value
DOCUMENT_MARGIN_RIGHT_TWIPS
public const string DOCUMENT_MARGIN_RIGHT_TWIPS = "document.marginRightTwips"
Field Value
DOCUMENT_MARGIN_TOP_TWIPS
public const string DOCUMENT_MARGIN_TOP_TWIPS = "document.marginTopTwips"
Field Value
DOCUMENT_PAGE_HEIGHT_TWIPS
public const string DOCUMENT_PAGE_HEIGHT_TWIPS = "document.pageHeightTwips"
Field Value
DOCUMENT_PAGE_NUMBER_START
public const string DOCUMENT_PAGE_NUMBER_START = "document.pageNumberStart"
Field Value
DOCUMENT_PAGE_ORIENTATION
public const string DOCUMENT_PAGE_ORIENTATION = "document.pageOrientation"
Field Value
DOCUMENT_PAGE_WIDTH_TWIPS
public const string DOCUMENT_PAGE_WIDTH_TWIPS = "document.pageWidthTwips"
Field Value
JUSTIFY_CENTER
Justify center
public const int JUSTIFY_CENTER = 2
Field Value
JUSTIFY_FULL
Justify full
public const int JUSTIFY_FULL = 3
Field Value
JUSTIFY_LEFT
paragraph properties
public const int JUSTIFY_LEFT = 0
Field Value
JUSTIFY_RIGHT
Justify right
public const int JUSTIFY_RIGHT = 1
Field Value
OFF
public const int OFF = 0
Field Value
ON
public const int ON = 1
Field Value
PAGE_LANDSCAPE
Landscape orientation
public const string PAGE_LANDSCAPE = "1"
Field Value
PAGE_PORTRAIT
document properties
public const string PAGE_PORTRAIT = "0"
Field Value
PARAGRAPH
public const string PARAGRAPH = "paragraph."
Field Value
PARAGRAPH_BORDER
public const string PARAGRAPH_BORDER = "paragraph.border"
Field Value
PARAGRAPH_BORDER_BOTTOM
possible border settting
public const int PARAGRAPH_BORDER_BOTTOM = 1
Field Value
PARAGRAPH_BORDER_CELL
public const string PARAGRAPH_BORDER_CELL = "paragraph.borderCell"
Field Value
PARAGRAPH_BORDER_DIAGONAL_UL_LR
possible border settting
public const int PARAGRAPH_BORDER_DIAGONAL_UL_LR = 16
Field Value
PARAGRAPH_BORDER_DIAGONAL_UR_LL
possible border settting
public const int PARAGRAPH_BORDER_DIAGONAL_UR_LL = 32
Field Value
PARAGRAPH_BORDER_LEFT
possible border settting
public const int PARAGRAPH_BORDER_LEFT = 4
Field Value
PARAGRAPH_BORDER_NIL
possible border settting
public const int PARAGRAPH_BORDER_NIL = 0
Field Value
PARAGRAPH_BORDER_RIGHT
possible border settting
public const int PARAGRAPH_BORDER_RIGHT = 8
Field Value
PARAGRAPH_BORDER_TABLE_HORIZONTAL
possible border settting
public const int PARAGRAPH_BORDER_TABLE_HORIZONTAL = 64
Field Value
PARAGRAPH_BORDER_TABLE_VERTICAL
possible border settting
public const int PARAGRAPH_BORDER_TABLE_VERTICAL = 128
Field Value
PARAGRAPH_BORDER_TOP
possible border settting
public const int PARAGRAPH_BORDER_TOP = 2
Field Value
PARAGRAPH_INDENT_FIRST_LINE
public const string PARAGRAPH_INDENT_FIRST_LINE = "paragraph.indentFirstLine"
Field Value
PARAGRAPH_INDENT_LEFT
public const string PARAGRAPH_INDENT_LEFT = "paragraph.indentLeft"
Field Value
PARAGRAPH_INDENT_RIGHT
public const string PARAGRAPH_INDENT_RIGHT = "paragraph.indentRight"
Field Value
PARAGRAPH_JUSTIFICATION
public const string PARAGRAPH_JUSTIFICATION = "paragraph.justification"
Field Value
PGN_DECIMAL
section properties
public const int PGN_DECIMAL = 0
Field Value
PGN_LETTER_LOWERCASE
Lowercase Letter
public const int PGN_LETTER_LOWERCASE = 4
Field Value
PGN_LETTER_UPPERCASE
Uppercase Letter
public const int PGN_LETTER_UPPERCASE = 3
Field Value
PGN_ROMAN_NUMERAL_LOWERCASE
Lowercase Roman Numeral
public const int PGN_ROMAN_NUMERAL_LOWERCASE = 2
Field Value
PGN_ROMAN_NUMERAL_UPPERCASE
Uppercase Roman Numeral
public const int PGN_ROMAN_NUMERAL_UPPERCASE = 1
Field Value
Properties
Properties for this RtfProperty object
protected INullValueDictionary<string, object> Properties
Field Value
SBK_COLUMN
Section Break Column break
public const int SBK_COLUMN = 1
Field Value
SBK_EVEN
Section Break Even page break
public const int SBK_EVEN = 2
Field Value
SBK_NONE
Section Break None
public const int SBK_NONE = 0
Field Value
SBK_ODD
Section Break Odd page break
public const int SBK_ODD = 3
Field Value
SBK_PAGE
Section Break Page break
public const int SBK_PAGE = 4
Field Value
SECTION
public const string SECTION = "section."
Field Value
SECTION_BREAK_TYPE
public const string SECTION_BREAK_TYPE = "section.SectionBreakType"
Field Value
SECTION_NUMBER_OF_COLUMNS
public const string SECTION_NUMBER_OF_COLUMNS = "section.numberOfColumns"
Field Value
SECTION_PAGE_NUMBER_FORMAT
public const string SECTION_PAGE_NUMBER_FORMAT = "section.pageNumberFormat"
Field Value
SECTION_PAGE_NUMBER_POSITION_X
public const string SECTION_PAGE_NUMBER_POSITION_X = "section.pageNumberPositionX"
Field Value
SECTION_PAGE_NUMBER_POSITION_Y
public const string SECTION_PAGE_NUMBER_POSITION_Y = "section.pageNumberPositionY"
Field Value
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
stringThe 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
stringString 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
SetModifiedCharacter(bool)
public void SetModifiedCharacter(bool modifiedCharacter)
Parameters
modifiedCharacter
boolthe modifiedCharacter to set
SetModifiedDocument(bool)
public void SetModifiedDocument(bool modifiedDocument)
Parameters
modifiedDocument
boolthe modifiedDocument to set
SetModifiedParagraph(bool)
public void SetModifiedParagraph(bool modifiedParagraph)
Parameters
modifiedParagraph
boolthe modifiedParagraph to set
SetModifiedSection(bool)
public void SetModifiedSection(bool modifiedSection)
Parameters
modifiedSection
boolthe modifiedSection to set
SetProperty(RtfCtrlWordData)
Set the value of the property identified by the parameter.
public bool SetProperty(RtfCtrlWordData ctrlWordData)
Parameters
ctrlWordData
RtfCtrlWordDataThe 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
stringString 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
RtfCtrlWordDataThe property name to set
Returns
- bool
true for handled or false if propertyName is null or blank