Class ImageElement
An image in the layout flow. Scaled to the available width if necessary, keeping its aspect ratio.
public sealed class ImageElement : LayoutElement
- Inheritance
-
ImageElement
- Inherited Members
Constructors
ImageElement(PdfImage, double?, double?)
Creates an image element. If only one of width and height (points) is given,
the other follows from the aspect ratio; if neither is given, the pixel size at 96 dpi is used.
public ImageElement(PdfImage image, double? width = null, double? height = null)
Parameters
Properties
Alignment
Horizontal position within the available width (default Left; Justify is treated as Left).
public TextAlignment Alignment { get; set; }
Property Value
AlternateText
Alternative text describing the image (tagged PDF / PDF/UA requires it for figures).
public string? AlternateText { get; set; }
Property Value
Height
Display height in points; default: derived from the width and the aspect ratio, or pixel size at 96 dpi.
public double? Height { get; set; }
Property Value
Image
The image to draw.
public PdfImage Image { get; }
Property Value
IsDecorative
Purely decorative image: marked as artifact instead of a figure in tagged documents.
public bool IsDecorative { get; set; }
Property Value
Width
Display width in points; default: pixel size at 96 dpi.
public double? Width { get; set; }