Image Class

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Represents image object. Appears as inline element by default, but takes into account its [!:Image.Width] and [!:Image.Height] properties despite the fact that such behaviour is being normally accepted by block or inline-block elements only. If image width or height is set to Auto or null it will be assumed to be equal to original value in pixels.
Inheritance Hierarchy

SystemObject
  Apitron.PDF.Kit.FlowLayoutContentElement
    Apitron.PDF.Kit.FlowLayout.ContentImage

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

public sealed class Image : ContentElement

The Image type exposes the following members.

Constructors

  NameDescription
Public methodCode exampleImage
Initializes a new instance of the Image class.
Top
Properties

  NameDescription
Public propertyAlign
Gets or sets the text align.
(Inherited from ContentElement.)
Public propertyBackground
Gets or sets the background color.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBackgroundPosition
Gets or sets the background position value for the element. The background position property sets the starting position of a background image.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBookmark
Gets or sets the bookmark.
(Inherited from ContentElement.)
Public propertyBorder
Gets or sets the border around the element.
(Inherited from ContentElement.)
Public propertyBorderBottom
Gets or sets the bottom border.
(Inherited from ContentElement.)
Public propertyBorderColor
Gets or sets the color of the border.
(Inherited from ContentElement.)
Public propertyBorderLeft
Gets or sets the left border.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyBorderRight
Gets or sets the right border.
(Inherited from ContentElement.)
Public propertyBorderTop
Gets or sets the top border.
(Inherited from ContentElement.)
Public propertyCellPadding
Gets or sets the cell padding, affects only Grid elements.
(Inherited from ContentElement.)
Public propertyCharacterSpacing
Gets or sets the character spacing.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyColor
Gets or sets the foreground color for the element.
(Inherited from ContentElement.)
Public propertyColSpan
Gets or sets the column span that this element takes. Affects element placed inside the Grid container.
(Inherited from ContentElement.)
Public propertyDisplay
Gets or sets the display setting for the element.
(Inherited from ContentElement.)
Public propertyFloat
Gets or sets the value indicating that element can float.
(Inherited from ContentElement.)
Public propertyFont
Gets or sets the font for the element.
(Inherited from ContentElement.)
Public propertyHeight
Gets or sets the height of the element.
(Inherited from ContentElement.)
Public propertyId
Gets or sets Id.
(Inherited from ContentElement.)
Public propertyInnerBorder
Gets or sets the inner border, affects only Grid elements.
(Inherited from ContentElement.)
Public propertyInnerBorderColor
Gets or sets the color of the inner border affects only Grid elements.
(Inherited from ContentElement.)
Public propertyLineHeight
Gets or sets the height of the line.
(Inherited from ContentElement.)
Public propertyLink
Gets or sets the link.
(Inherited from ContentElement.)
Public propertyListCounter
Gets or sets the list counter.
(Inherited from ContentElement.)
Public propertyListMarker
Gets or sets the list marker appearance.
(Inherited from ContentElement.)
Public propertyListMarkerPadding
Gets or sets the list marker padding.
(Inherited from ContentElement.)
Public propertyListStyle
Gets or sets the list style.
(Inherited from ContentElement.)
Public propertyMargin
Gets or sets the margin around the element.
(Inherited from ContentElement.)
Public propertyPadding
Gets or sets the padding.
(Inherited from ContentElement.)
Public propertyResourceId
Gets the resource Id of the referenced image object.
Public propertyRowSpan
Gets or sets the row span that this element takes. Affects element placed inside the Grid container.
(Inherited from ContentElement.)
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.
(Inherited from ContentElement.)
Public propertyStructureType
Gets or sets the type of the logical structure.
(Inherited from ContentElement.)
Public propertyTag
Gets or sets the tag for this element. It can be any object and can be used for any user-defined purpose.
(Inherited from ContentElement.)
Public propertyTextDecoration
Gets or sets the text decoration.
(Inherited from ContentElement.)
Public propertyTextIndent
Gets or sets the text indent.
(Inherited from ContentElement.)
Public propertyTextRenderingMode
Gets or sets the text rendering mode used to draw textual elements. By default all text is being drawn using Fill setting.
(Inherited from ContentElement.)
Public propertyVerticalAlign
Gets or sets the vertical align.
(Inherited from ContentElement.)
Public propertyWidth
Gets or sets the width of the element.
(Inherited from ContentElement.)
Public propertyWordSpacing
Gets or sets the word spacing.
(Inherited from ContentElement.)
Top
Remarks

Examples

C#
FlowDocument document = new FlowDocument();
ResourceManager resourceManager = new ResourceManager();
resourceManager.RegisterResource(new FixedLayout.Resources.XObjects.Image("logo", "logo.jpg"));
document.Add(new Image("logo"){ Width = 76, Height = 76 });
See Also

Reference