ContentElement Class

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Represents a base class for all content elements.
Inheritance Hierarchy

SystemObject
  Apitron.PDF.Kit.FlowLayoutContentElement
    More...

Namespace:  Apitron.PDF.Kit.FlowLayout
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax

public abstract class ContentElement

The ContentElement type exposes the following members.

Properties

  NameDescription
Public propertyAlign
Gets or sets the text align.
Public propertyBackground
Gets or sets the background color.
Public propertyBackgroundImage
Gets or sets the background image for the element. The background of an element is the total size of the element, including padding (but not the margin and border). By default, a background-image is placed at the top-left corner of an element, and repeated both vertically and horizontally.
Public propertyBackgroundPosition
Gets or sets the background position value for the element. The background position property sets the starting position of a background image.
Public propertyBackgroundRepeat
Gets or sets the background repeat value for the element. The background repeat property sets if/how a background image will be repeated. By default, a background image is repeated both vertically and horizontally.
Public propertyBookmark
Gets or sets the bookmark.
Public propertyBorder
Gets or sets the border around the element.
Public propertyBorderBottom
Gets or sets the bottom border.
Public propertyBorderColor
Gets or sets the color of the border.
Public propertyBorderLeft
Gets or sets the left border.
Public propertyBorderRadius
Gets or sets the border radius. Can be set using percentage value, in this case it's calculated using content width including padding as a base.
Public propertyBorderRight
Gets or sets the right border.
Public propertyBorderTop
Gets or sets the top border.
Public propertyCellPadding
Gets or sets the cell padding, affects only Grid elements.
Public propertyCharacterSpacing
Gets or sets the character spacing.
Public propertyCode exampleClass
Gets or sets classes list this element belongs to, so it will match selectors for this class. Use space to separate classes from each other.
Public propertyClear
Gets or sets the clear flag for the element indicating whether it should ignore floating elements (if any) and start a new line.
Public propertyColor
Gets or sets the foreground color for the element.
Public propertyColSpan
Gets or sets the column span that this element takes. Affects element placed inside the Grid container.
Public propertyDisplay
Gets or sets the display setting for the element.
Public propertyStatic memberEmpty
Gets the empty element, designed to represent an empty entry in GridRow. Can't be inserted to other containers.
Public propertyFloat
Gets or sets the value indicating that element can float.
Public propertyFont
Gets or sets the font for the element.
Public propertyHeight
Gets or sets the height of the element.
Public propertyId
Gets or sets Id.
Public propertyInnerBorder
Gets or sets the inner border, affects only Grid elements.
Public propertyInnerBorderColor
Gets or sets the color of the inner border affects only Grid elements.
Public propertyLineHeight
Gets or sets the height of the line.
Public propertyLink
Gets or sets the link.
Public propertyListCounter
Gets or sets the list counter.
Public propertyListMarker
Gets or sets the list marker appearance.
Public propertyListMarkerPadding
Gets or sets the list marker padding.
Public propertyListStyle
Gets or sets the list style.
Public propertyMargin
Gets or sets the margin around the element.
Public propertyPadding
Gets or sets the padding.
Public propertyRowSpan
Gets or sets the row span that this element takes. Affects element placed inside the Grid container.
Public propertyScriptLevel
Gets or sets the value used to create subscripting or superscripting effect. It defines the level of effect, zero can be used for normal scripting, positive values are for superscripting, negative for subscripting. Affects textual elements.
Public propertyStructureType
Gets or sets the type of the logical structure.
Public propertyTag
Gets or sets the tag for this element. It can be any object and can be used for any user-defined purpose.
Public propertyTextDecoration
Gets or sets the text decoration.
Public propertyTextIndent
Gets or sets the text indent.
Public propertyTextRenderingMode
Gets or sets the text rendering mode used to draw textual elements. By default all text is being drawn using Fill setting.
Public propertyVerticalAlign
Gets or sets the vertical align.
Public propertyWidth
Gets or sets the width of the element.
Public propertyWordSpacing
Gets or sets the word spacing.
Top
Methods

  NameDescription
Public methodStatic memberCode exampleFromMarkup
Creates a collection of elements using given text as markup. The markup looks similar to XML markup, given that each element will have its Class property assigned to the name or a set of names of the enclosing tags. The resulting list will contain parsed content elements(mostly textblocks) with assigned classes. A markup element can contain the following attributes:
  • link, affects the Link property of the created element. If link destination starts with # then it will be considered as a CrossReference otherwise as a LinkUri. There is an additional attribute supported, href that works exactly the same.
  • Bookmark, affects the Bookmark property of the created element.
  • Id, affects the Id property of the created element, so it can be linked to.
  • elementType, sets the target content element type, currently supported values are: section, image. This attribute makes it possible to create sections containing other elements or define some of the elements as images.
A few tags have special meaning:
  • <img>, can be used for putting images, e.g. <img src='[path to file or resource id]' width='[image width][unit]' height='[image height][unit]'/> creates Image element entry. Unit can be omitted or can be one of the following: auto|pt|in|px|cm|%.
  • <br/>, creates Br element entry.
  • <div/>,<ol/>,<ul/>, create Section element entry.
Top
See Also

Reference

Inheritance Hierarchy

SystemObject
  Apitron.PDF.Kit.FlowLayoutContentElement
    Apitron.PDF.Kit.FlowLayoutContainerElementT
    Apitron.PDF.Kit.FlowLayout.ContentBr
    Apitron.PDF.Kit.FlowLayout.ContentContentReference
    Apitron.PDF.Kit.FlowLayout.Content.ControlsControlElement
    Apitron.PDF.Kit.FlowLayout.ContentHr
    Apitron.PDF.Kit.FlowLayout.ContentImage
    Apitron.PDF.Kit.FlowLayout.ContentPageBreak
    Apitron.PDF.Kit.FlowLayout.ContentPageCount
    Apitron.PDF.Kit.FlowLayout.ContentTextBlock