Table of Contents

Class ImageElement

Namespace
MiPdf.Layout
Assembly
MiPdf.dll

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

image PdfImage
width double?
height double?

Properties

Alignment

Horizontal position within the available width (default Left; Justify is treated as Left).

public TextAlignment Alignment { get; set; }

Property Value

TextAlignment

AlternateText

Alternative text describing the image (tagged PDF / PDF/UA requires it for figures).

public string? AlternateText { get; set; }

Property Value

string

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

double?

Image

The image to draw.

public PdfImage Image { get; }

Property Value

PdfImage

IsDecorative

Purely decorative image: marked as artifact instead of a figure in tagged documents.

public bool IsDecorative { get; set; }

Property Value

bool

Width

Display width in points; default: pixel size at 96 dpi.

public double? Width { get; set; }

Property Value

double?