iText 8.0.4 API
iText.Layout.Element.Div Class Reference

A Div is a container object that defines a section in a document, which will have some shared layout properties. More...

Inheritance diagram for iText.Layout.Element.Div:
iText.Layout.Element.BlockElement< Div > iText.Layout.Element.ListItem iText.Layout.Element.MulticolContainer

Public Member Functions

virtual Div  Add (IBlockElement element)
  Adds any block element to the div's contents. More...
 
virtual Div  Add (Image element)
  Adds an image to the div's contents. More...
 
virtual Div  Add (AreaBreak areaBreak)
  Adds an area break to the div's contents. More...
 
override AccessibilityProperties  GetAccessibilityProperties ()
  Gets the accessibility properties. More...
 
virtual Div  SetFillAvailableArea (bool fillArea)
  Defines whether the Div should occupy all the space left in the available area in case it is the last element in this area. More...
 
virtual Div  SetFillAvailableAreaOnSplit (bool fillAreaOnSplit)
  Defines whether the Div should occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area. More...
 
- Public Member Functions inherited from iText.Layout.Element.BlockElement< Div >
override T1  GetDefaultProperty< T1 > (int property)
  Gets the default property from this entity. More...
 
virtual UnitValue  GetMarginLeft ()
  Gets the current left margin width of the element. More...
 
virtual T  SetMarginLeft (float value)
  Sets the left margin width of the element. More...
 
virtual UnitValue  GetMarginRight ()
  Gets the current right margin width of the element. More...
 
virtual T  SetMarginRight (float value)
  Sets the right margin width of the element. More...
 
virtual UnitValue  GetMarginTop ()
  Gets the current top margin width of the element. More...
 
virtual T  SetMarginTop (float value)
  Sets the top margin width of the element. More...
 
virtual UnitValue  GetMarginBottom ()
  Gets the current bottom margin width of the element. More...
 
virtual T  SetMarginBottom (float value)
  Sets the bottom margin width of the element. More...
 
virtual T  SetMargin (float commonMargin)
  Sets all margins around the element to the same width. More...
 
virtual T  SetMargins (float marginTop, float marginRight, float marginBottom, float marginLeft)
  Sets the margins around the element to a series of new widths. More...
 
virtual UnitValue  GetPaddingLeft ()
  Gets the current left padding width of the element. More...
 
virtual T  SetPaddingLeft (float value)
  Sets the left padding width of the element. More...
 
virtual UnitValue  GetPaddingRight ()
  Gets the current right padding width of the element. More...
 
virtual T  SetPaddingRight (float value)
  Sets the right padding width of the element. More...
 
virtual UnitValue  GetPaddingTop ()
  Gets the current top padding width of the element. More...
 
virtual T  SetPaddingTop (float value)
  Sets the top padding width of the element. More...
 
virtual UnitValue  GetPaddingBottom ()
  Gets the current bottom padding width of the element. More...
 
virtual T  SetPaddingBottom (float value)
  Sets the bottom padding width of the element. More...
 
virtual T  SetPadding (float commonPadding)
  Sets all paddings around the element to the same width. More...
 
virtual T  SetPaddings (float paddingTop, float paddingRight, float paddingBottom, float paddingLeft)
  Sets the paddings around the element to a series of new widths. More...
 
virtual T  SetVerticalAlignment (VerticalAlignment? verticalAlignment)
  Sets the vertical alignment of the element. More...
 
virtual T  SetSpacingRatio (float ratio)
  Sets a ratio which determines in which proportion will word spacing and character spacing be applied when horizontal alignment is justified. More...
 
virtual ? bool  IsKeepTogether ()
  Returns whether the BlockElement should be kept together as much as possible. More...
 
virtual T  SetKeepTogether (bool keepTogether)
  Sets whether the BlockElement should be kept together as much as possible. More...
 
virtual ? bool  IsKeepWithNext ()
  Returns whether the end of this BlockElement and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetKeepWithNext (bool keepWithNext)
  Sets whether the end of this BlockElement and the start of the next sibling of this element should be placed in the same area. More...
 
virtual T  SetRotationAngle (float angleInRadians)
  Sets the rotation radAngle. More...
 
virtual T  SetRotationAngle (double angleInRadians)
  Sets the rotation angle. More...
 
virtual T  SetWidth (float width)
  Sets the width property of a block element, measured in points. More...
 
virtual T  SetWidth (UnitValue width)
  Sets the width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual UnitValue  GetWidth ()
  Gets the width property of a block element. More...
 
virtual T  SetHeight (UnitValue height)
  Sets the height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetHeight (float height)
  Sets the height property a block element as a point-value. More...
 
virtual UnitValue  GetHeight ()
  Gets the height property of a block element. More...
 
virtual T  SetMaxHeight (float maxHeight)
  Sets the max-height of a block element as point-unit value. More...
 
virtual T  SetMaxHeight (UnitValue maxHeight)
  Sets the max-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (UnitValue minHeight)
  Sets the min-height property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinHeight (float minHeight)
  Sets the min-height of a block element as point-unit value. More...
 
virtual T  SetMaxWidth (UnitValue maxWidth)
  Sets the max-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMaxWidth (float maxWidth)
  Sets the max-width of a block element as point-unit value. More...
 
virtual T  SetMinWidth (UnitValue minWidth)
  Sets the min-width property of a block element with a iText.Layout.Properties.UnitValue. More...
 
virtual T  SetMinWidth (float minWidth)
  Sets the min-width of a block element as point-unit value. More...
 
virtual T  SetNeutralRole ()
  Give this element a neutral role. More...
 

Detailed Description

A Div is a container object that defines a section in a document, which will have some shared layout properties.

A Div is a container object that defines a section in a document, which will have some shared layout properties. Like all BlockElement types, it will try to take up as much horizontal space as possible.

The concept is very similar to that of the div tag in HTML.

Member Function Documentation

◆ Add() [1/3]

virtual Div iText.Layout.Element.Div.Add ( AreaBreak  areaBreak )
inlinevirtual

Adds an area break to the div's contents.

Parameters
areaBreak an AreaBreak
Returns
this Element

◆ Add() [2/3]

virtual Div iText.Layout.Element.Div.Add ( IBlockElement  element )
inlinevirtual

Adds any block element to the div's contents.

Parameters
element a BlockElement
Returns
this Element

◆ Add() [3/3]

virtual Div iText.Layout.Element.Div.Add ( Image  element )
inlinevirtual

Adds an image to the div's contents.

Parameters
element an Image
Returns
this Element

◆ GetAccessibilityProperties()

override AccessibilityProperties iText.Layout.Element.Div.GetAccessibilityProperties ( )
inlinevirtual

Gets the accessibility properties.

Gets the accessibility properties . See also IAccessibleElement.

Returns
an interface that allows to specify properties of a tagged element in Tagged PDF.

Implements iText.Layout.Element.BlockElement< Div >.

Reimplemented in iText.Layout.Element.ListItem.

◆ SetFillAvailableArea()

virtual Div iText.Layout.Element.Div.SetFillAvailableArea ( bool  fillArea )
inlinevirtual

Defines whether the Div should occupy all the space left in the available area in case it is the last element in this area.

Parameters
fillArea defines whether the available area should be filled
Returns
this Div

◆ SetFillAvailableAreaOnSplit()

virtual Div iText.Layout.Element.Div.SetFillAvailableAreaOnSplit ( bool  fillAreaOnSplit )
inlinevirtual

Defines whether the Div should occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area.

Parameters
fillAreaOnSplit defines whether the available area should be filled
Returns
this Div