iText 8.0.5 API
|
A generic abstract element that fits in a PDF layout object hierarchy. More...
Public Member Functions |
|
virtual void | SetProperty (int property, Object value) |
Sets a property for this entity. More... |
|
virtual bool | HasProperty (int property) |
Checks if this entity has the specified property. More... |
|
virtual bool | HasOwnProperty (int property) |
Checks if this entity has the specified property, i.e. if it was set to this very element earlier More... |
|
virtual void | DeleteOwnProperty (int property) |
Deletes the own property of this entity. More... |
|
virtual T1 | GetProperty< T1 > (int property) |
Gets the property from this entity. More... |
|
virtual T1 | GetOwnProperty< T1 > (int property) |
Gets own property from this entity. More... |
|
virtual T1 | GetDefaultProperty< T1 > (int property) |
Gets the default property from this entity. More... |
|
virtual T | SetRelativePosition (float left, float top, float right, float bottom) |
Sets values for a relative repositioning of the Element. More... |
|
virtual T | SetFixedPosition (float left, float bottom, float width) |
Sets values for a absolute repositioning of the Element. More... |
|
virtual T | SetFixedPosition (float left, float bottom, UnitValue width) |
Sets values for an absolute repositioning of the Element. More... |
|
virtual T | SetFixedPosition (int pageNumber, float left, float bottom, float width) |
Sets values for a absolute repositioning of the Element. More... |
|
virtual T | SetFixedPosition (int pageNumber, float left, float bottom, UnitValue width) |
Sets values for a absolute repositioning of the Element. More... |
|
virtual T | SetHorizontalAlignment (HorizontalAlignment? horizontalAlignment) |
Sets the horizontal alignment of this Element. More... |
|
virtual T | SetFont (PdfFont font) |
Sets the font of this Element. More... |
|
virtual T | SetFontFamily (params String[] fontFamilyNames) |
Sets the preferable font families for this Element. More... |
|
virtual T | SetFontFamily (IList< String > fontFamilyNames) |
Sets the preferable font families for this Element. More... |
|
virtual T | SetFontColor (Color fontColor) |
Sets the font color of this Element. More... |
|
virtual T | SetFontColor (Color fontColor, float opacity) |
Sets the font color of this Element and the opacity of the text. More... |
|
virtual T | SetFontColor (TransparentColor transparentColor) |
virtual T | SetFontSize (float fontSize) |
Sets the font size of this Element, measured in points. More... |
|
virtual T | SetTextAlignment (TextAlignment? alignment) |
Sets the text alignment of this Element. More... |
|
virtual T | SetCharacterSpacing (float charSpacing) |
Defines a custom spacing distance between all characters of a textual element. More... |
|
virtual T | SetWordSpacing (float wordSpacing) |
Defines a custom spacing distance between words of a textual element. More... |
|
virtual T | SetFontKerning (FontKerning fontKerning) |
Enable or disable kerning. More... |
|
virtual T | SetBackgroundColor (Color backgroundColor) |
Specifies a background color for the Element. More... |
|
virtual T | SetBackgroundColor (Color backgroundColor, float opacity) |
Specifies a background color for the Element. More... |
|
virtual T | SetBackgroundColor (Color backgroundColor, float extraLeft, float extraTop, float extraRight, float extraBottom) |
Specifies a background color for the Element, and extra space that must be counted as part of the background and therefore colored. More... |
|
virtual T | SetBackgroundColor (Color backgroundColor, float opacity, float extraLeft, float extraTop, float extraRight, float extraBottom) |
Specifies a background color for the Element, and extra space that must be counted as part of the background and therefore colored. More... |
|
virtual T | SetBackgroundImage (BackgroundImage image) |
Specifies a background image for the Element. More... |
|
virtual T | SetBackgroundImage (IList< BackgroundImage > imagesList) |
Specifies a list of background images for the Element. More... |
|
virtual T | SetBorder (Border border) |
Sets a border for all four edges of this Element with customizable color, width, pattern type. More... |
|
virtual T | SetBorderTop (Border border) |
Sets a border for the upper limit of this Element with customizable color, width, pattern type. More... |
|
virtual T | SetBorderRight (Border border) |
Sets a border for the right limit of this Element with customizable color, width, pattern type. More... |
|
virtual T | SetBorderBottom (Border border) |
Sets a border for the bottom limit of this Element with customizable color, width, pattern type. More... |
|
virtual T | SetBorderLeft (Border border) |
Sets a border for the left limit of this Element with customizable color, width, pattern type. More... |
|
virtual T | SetBorderRadius (BorderRadius borderRadius) |
Sets a border radius for all four edges of this Element. More... |
|
virtual T | SetBorderBottomLeftRadius (BorderRadius borderRadius) |
Sets a border radius for the bottom left corner of this Element. More... |
|
virtual T | SetBorderBottomRightRadius (BorderRadius borderRadius) |
Sets a border radius for the bottom right corner of this Element. More... |
|
virtual T | SetBorderTopLeftRadius (BorderRadius borderRadius) |
Sets a border radius for the top left corner of this Element. More... |
|
virtual T | SetBorderTopRightRadius (BorderRadius borderRadius) |
Sets a border radius for the top right corner of this Element. More... |
|
virtual T | SetSplitCharacters (ISplitCharacters splitCharacters) |
Sets a rule for splitting strings when they don't fit into one line. More... |
|
virtual ISplitCharacters | GetSplitCharacters () |
Gets a rule for splitting strings when they don't fit into one line. More... |
|
virtual ? int | GetTextRenderingMode () |
Gets the text rendering mode, a variable that determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. More... |
|
virtual T | SetTextRenderingMode (int textRenderingMode) |
Sets the text rendering mode, a variable that determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. More... |
|
virtual Color | GetStrokeColor () |
Gets the stroke color for the current element. More... |
|
virtual T | SetStrokeColor (Color strokeColor) |
Sets the stroke color for the current element. More... |
|
virtual ? float | GetStrokeWidth () |
Gets the stroke width for the current element. More... |
|
virtual T | SetStrokeWidth (float strokeWidth) |
Sets the stroke width for the current element. More... |
|
virtual T | SetBold () |
Switch on the simulation of bold style for a font. More... |
|
virtual T | SetItalic () |
Switch on the simulation of italic style for a font. More... |
|
virtual T | SetLineThrough () |
Sets default line-through attributes for text. More... |
|
virtual T | SetUnderline () |
Sets default underline attributes for text. More... |
|
virtual T | SetUnderline (float thickness, float yPosition) |
Sets an horizontal line that can be an underline or a strikethrough. More... |
|
virtual T | SetUnderline (Color color, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle) |
Sets an horizontal line that can be an underline or a strikethrough. More... |
|
virtual T | SetUnderline (Color color, float opacity, float thickness, float thicknessMul, float yPosition, float yPositionMul, int lineCapStyle) |
Sets an horizontal line that can be an underline or a strikethrough. More... |
|
virtual T | SetBaseDirection (BaseDirection? baseDirection) |
This attribute specifies the base direction of directionally neutral text (i.e., text that doesn't have inherent directionality as defined in Unicode) in an element's content and attribute values. More... |
|
virtual T | SetHyphenation (HyphenationConfig hyphenationConfig) |
Sets a custom hyphenation configuration which will hyphenate words automatically accordingly to the language and country. More... |
|
virtual T | SetFontScript (UnicodeScript? script) |
Sets the writing system for this text element. More... |
|
virtual T | SetDestination (String destination) |
Sets a destination name that will be created when this element is drawn to content. More... |
|
virtual T | SetOpacity (float? opacity) |
Sets an opacity of the given element. More... |
|
Package Attributes |
|
IDictionary< int, Object > | properties = new Dictionary |
A generic abstract element that fits in a PDF layout object hierarchy.
A generic abstract element that fits in a PDF layout object hierarchy. A superclass of all layout object implementations.
T | this type |
T | : | IPropertyContainer |
|
inlinevirtual |
Deletes the own property of this entity.
property | the property to be deleted |
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >.
|
inlinevirtual |
Gets the default property from this entity.
T1 | the return type associated with the property |
property | the property to be retrieved |
null
will be returned
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Forms.Form.Element.FormField< T >, iText.Layout.RootElement< T >, and iText.Layout.Element.BlockElement< T >.
|
inlinevirtual |
Gets own property from this entity.
Gets own property from this entity. The property must have been set earlier to this entity. If the property is not found, null
will be returned.
T1 | the return type associated with the property |
property | the property to be retrieved |
null
will be returned if the property value was not found
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >.
|
inlinevirtual |
Gets the property from this entity.
Gets the property from this entity. Compared to GetOwnProperty
T1 | the return type associated with the property |
property | the property to be retrieved |
null
will be returned if the property value was not found
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >, and iText.Layout.Element.AbstractElement< T >.
|
inlinevirtual |
Gets a rule for splitting strings when they don't fit into one line.
|
inlinevirtual |
Gets the stroke color for the current element.
Gets the stroke color for the current element. The stroke color is the color of the outlines or edges of a shape.
|
inlinevirtual |
Gets the stroke width for the current element.
Gets the stroke width for the current element. The stroke width is the width of the outlines or edges of a shape.
|
inlinevirtual |
Gets the text rendering mode, a variable that determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three.
|
inlinevirtual |
Checks if this entity has the specified property, i.e. if it was set to this very element earlier
property | the property to be checked |
true
if this instance has given own property, false
otherwise
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >.
|
inlinevirtual |
Checks if this entity has the specified property.
Checks if this entity has the specified property. Compared to HasOwnProperty(int) , this method can check parent's properties, styles, etc, depending on the origin of the instance
property | the property to be checked |
true
if this instance has given property, false
otherwise
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >, and iText.Layout.Element.AbstractElement< T >.
|
inlinevirtual |
|
inlinevirtual |
Specifies a background color for the Element, and extra space that must be counted as part of the background and therefore colored.
backgroundColor | the background color |
extraLeft | extra coloring to the left side |
extraTop | extra coloring at the top |
extraRight | extra coloring to the right side |
extraBottom | extra coloring at the bottom |
|
inlinevirtual |
|
inlinevirtual |
Specifies a background color for the Element, and extra space that must be counted as part of the background and therefore colored.
backgroundColor | the background color |
opacity | the background color opacity; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent |
extraLeft | extra coloring to the left side |
extraTop | extra coloring at the top |
extraRight | extra coloring to the right side |
extraBottom | extra coloring at the bottom |
|
inlinevirtual |
Specifies a background image for the Element.
image |
iText.Layout.Properties.BackgroundImage
|
inlinevirtual |
Specifies a list of background images for the Element.
imagesList | List of iText.Layout.Properties.BackgroundImage |
|
inlinevirtual |
This attribute specifies the base direction of directionally neutral text (i.e., text that doesn't have inherent directionality as defined in Unicode) in an element's content and attribute values.
baseDirection | base direction |
|
inlinevirtual |
Switch on the simulation of bold style for a font.
Switch on the simulation of bold style for a font. Be aware that using correct bold font is highly preferred over this option.
|
inlinevirtual |
Sets a border for all four edges of this Element with customizable color, width, pattern type.
border | a customized iText.Layout.Borders.Border |
|
inlinevirtual |
Sets a border for the bottom limit of this Element with customizable color, width, pattern type.
border | a customized iText.Layout.Borders.Border |
|
inlinevirtual |
Sets a border radius for the bottom left corner of this Element.
borderRadius | a customized iText.Layout.Properties.BorderRadius |
|
inlinevirtual |
Sets a border radius for the bottom right corner of this Element.
borderRadius | a customized iText.Layout.Properties.BorderRadius |
|
inlinevirtual |
Sets a border for the left limit of this Element with customizable color, width, pattern type.
border | a customized iText.Layout.Borders.Border |
|
inlinevirtual |
Sets a border radius for all four edges of this Element.
borderRadius | a customized iText.Layout.Properties.BorderRadius |
|
inlinevirtual |
Sets a border for the right limit of this Element with customizable color, width, pattern type.
border | a customized iText.Layout.Borders.Border |
|
inlinevirtual |
Sets a border for the upper limit of this Element with customizable color, width, pattern type.
border | a customized iText.Layout.Borders.Border |
|
inlinevirtual |
Sets a border radius for the top left corner of this Element.
borderRadius | a customized iText.Layout.Properties.BorderRadius |
|
inlinevirtual |
Sets a border radius for the top right corner of this Element.
borderRadius | a customized iText.Layout.Properties.BorderRadius |
|
inlinevirtual |
Defines a custom spacing distance between all characters of a textual element.
Defines a custom spacing distance between all characters of a textual element. The character-spacing parameter is added to the glyph's horizontal or vertical displacement (depending on the writing mode).
charSpacing | a floating point value |
|
inlinevirtual |
Sets a destination name that will be created when this element is drawn to content.
destination | the destination name to be created |
|
inlinevirtual |
Sets values for a absolute repositioning of the Element.
Sets values for a absolute repositioning of the Element. The coordinates specified correspond to the bottom-left corner of the element and it grows upwards. Also has as a side effect that the Element's iText.Layout.Properties.Property.POSITION is changed to fixed.
left | horizontal position of the bottom-left corner on the page |
bottom | vertical position of the bottom-left corner on the page |
width | a floating point value measured in points. |
|
inlinevirtual |
Sets values for an absolute repositioning of the Element.
Sets values for an absolute repositioning of the Element. The coordinates specified correspond to the bottom-left corner of the element, and it grows upwards. Also has as a side effect that the Element's iText.Layout.Properties.Property.POSITION is changed to fixed.
left | horizontal position of the bottom-left corner on the page |
bottom | vertical position of the bottom-left corner on the page |
width | a iText.Layout.Properties.UnitValue |
|
inlinevirtual |
Sets values for a absolute repositioning of the Element.
Sets values for a absolute repositioning of the Element. The coordinates specified correspond to the bottom-left corner of the element and it grows upwards. Also has as a side effect that the Element's iText.Layout.Properties.Property.POSITION is changed to fixed.
pageNumber | the page where the element must be positioned |
left | horizontal position of the bottom-left corner on the page |
bottom | vertical position of the bottom-left corner on the page |
width | a floating point value measured in points. |
|
inlinevirtual |
Sets values for a absolute repositioning of the Element.
Sets values for a absolute repositioning of the Element. The coordinates specified correspond to the bottom-left corner of the element and it grows upwards. Also has as a side effect that the Element's iText.Layout.Properties.Property.POSITION is changed to fixed.
pageNumber | the page where the element must be positioned |
left | horizontal position of the bottom-left corner on the page |
bottom | vertical position of the bottom-left corner on the page |
width | a floating point value measured in points. |
|
inlinevirtual |
Sets the font of this Element.
Sets the font of this Element.
This property overrides the value set by ElementPropertyContainer
font | a font |
|
inlinevirtual |
Sets the font color of this Element.
fontColor | a iText.Kernel.Colors.Color for the text in this Element. |
|
inlinevirtual |
Sets the font color of this Element and the opacity of the text.
fontColor | a iText.Kernel.Colors.Color for the text in this Element. |
opacity | an opacity for the text in this Element; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent. |
|
inlinevirtual |
Sets the preferable font families for this Element.
Sets the preferable font families for this Element. Note that iText.Layout.Font.FontProvider shall be set as well. See RootElement
This property overrides the value set by ElementPropertyContainer
All System.String that are passed as argument are directly handled as a collection of font family names, without any pre-processing. Every font family name is treated as a preferable font-family to be used inside the element. The fontFamilyNames argument is interpreted as as an ordered list, where every next font-family should be used if font for the previous one was not found or doesn't contain required glyphs.
fontFamilyNames | defines an ordered list of preferable font families for this Element. |
|
inlinevirtual |
Sets the preferable font families for this Element.
Sets the preferable font families for this Element. Note that iText.Layout.Font.FontProvider shall be set as well. See RootElement
This property overrides the value set by ElementPropertyContainer
All System.String that are passed as argument are directly handled as a collection of font family names, without any pre-processing. Every font family name is treated as a preferable font-family to be used inside the element. The fontFamilyNames argument is interpreted as as an ordered list, where every next font-family should be used if font for the previous one was not found or doesn't contain required glyphs.
fontFamilyNames | defines an ordered list of preferable font families for this Element. |
|
inlinevirtual |
Enable or disable kerning.
Enable or disable kerning. Some fonts may specify kern pairs, i.e. pair of glyphs, between which the amount of horizontal space is adjusted. This adjustment is typically negative, e.g. in "AV" pair the glyphs will typically be moved closer to each other.
fontKerning | an enum value as a boolean wrapper specifying whether or not to apply kerning |
|
inlinevirtual |
Sets the writing system for this text element.
script | a new script type |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Sets a custom hyphenation configuration which will hyphenate words automatically accordingly to the language and country.
hyphenationConfig | The hyphenation configuration |
|
inlinevirtual |
Switch on the simulation of italic style for a font.
Switch on the simulation of italic style for a font. Be aware that using correct italic (oblique) font is highly preferred over this option.
|
inlinevirtual |
Sets default line-through attributes for text.
Sets default line-through attributes for text. See ElementPropertyContainer
|
inlinevirtual |
Sets an opacity of the given element.
Sets an opacity of the given element. It will affect element content, borders and background. Note, that it will also affect all element children, as they are the content of the given element.
opacity | a float between 0 and 1, where 1 stands for fully opaque element and 0 - for fully transparent |
|
inlinevirtual |
Sets a property for this entity.
property | the property to be set |
value | the value of the property |
Implements iText.Layout.IPropertyContainer.
Reimplemented in iText.Layout.RootElement< T >.
|
inlinevirtual |
Sets values for a relative repositioning of the Element.
Sets values for a relative repositioning of the Element. Also has as a side effect that the Element's iText.Layout.Properties.Property.POSITION is changed to relative. The default implementation in iText.Layout.Renderer.AbstractRenderer treats left
and top
as the most important values. Only if left == 0
will right
be used for the calculation; ditto for top vs. bottom.
left | movement to the left |
top | movement upwards on the page |
right | movement to the right |
bottom | movement downwards on the page |
|
inlinevirtual |
Sets a rule for splitting strings when they don't fit into one line.
Sets a rule for splitting strings when they don't fit into one line. The default implementation is iText.Layout.Splitting.DefaultSplitCharacters
splitCharacters | an implementation of iText.Layout.Splitting.ISplitCharacters |
|
inlinevirtual |
Sets the stroke color for the current element.
Sets the stroke color for the current element. The stroke color is the color of the outlines or edges of a shape.
strokeColor | a new stroke color |
|
inlinevirtual |
Sets the stroke width for the current element.
Sets the stroke width for the current element. The stroke width is the width of the outlines or edges of a shape.
strokeWidth | a new stroke width |
|
inlinevirtual |
|
inlinevirtual |
Sets the text rendering mode, a variable that determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three.
textRenderingMode | an int value |
|
inlinevirtual |
Sets default underline attributes for text.
Sets default underline attributes for text. See other overloads for more fine tuning.
|
inlinevirtual |
Sets an horizontal line that can be an underline or a strikethrough.
Sets an horizontal line that can be an underline or a strikethrough. Actually, the line can be anywhere vertically due to position parameter. Multiple call to this method will produce multiple lines.
The thickness of the line will be thickness + thicknessMul * fontSize
. The position of the line will be baseLine + yPosition + yPositionMul * fontSize
.
color | the color of the line or null to follow the text color |
opacity | the opacity of the line; a float between 0 and 1, where 1 stands for fully opaque color and 0 - for fully transparent |
thickness | the absolute thickness of the line |
thicknessMul | the thickness multiplication factor with the font size |
yPosition | the absolute y position relative to the baseline |
yPositionMul | the position multiplication factor with the font size |
lineCapStyle | the end line cap style. Allowed values are enumerated in iText.Kernel.Pdf.Canvas.PdfCanvasConstants.LineCapStyle |
|
inlinevirtual |
Sets an horizontal line that can be an underline or a strikethrough.
Sets an horizontal line that can be an underline or a strikethrough. Actually, the line can be anywhere vertically due to position parameter. Multiple call to this method will produce multiple lines.
The thickness of the line will be thickness + thicknessMul * fontSize
. The position of the line will be baseLine + yPosition + yPositionMul * fontSize
.
color | the color of the line or null to follow the text color |
thickness | the absolute thickness of the line |
thicknessMul | the thickness multiplication factor with the font size |
yPosition | the absolute y position relative to the baseline |
yPositionMul | the position multiplication factor with the font size |
lineCapStyle | the end line cap style. Allowed values are enumerated in iText.Kernel.Pdf.Canvas.PdfCanvasConstants.LineCapStyle |
|
inlinevirtual |
Sets an horizontal line that can be an underline or a strikethrough.
Sets an horizontal line that can be an underline or a strikethrough. Actually, the line can be anywhere vertically and has always the text width. Multiple call to this method will produce multiple lines.
thickness | the absolute thickness of the line |
yPosition | the absolute y position relative to the baseline |
|
inlinevirtual |
Defines a custom spacing distance between words of a textual element.
Defines a custom spacing distance between words of a textual element. This value works exactly like the character spacing, but only kicks in at word boundaries.
wordSpacing | a floating point value |