Table of Contents

Class UserPlaceableImage

Namespace
Root.ReportNet.Pdf.Tools
Assembly
ReportNet.dll

Represents an image object that can be placed and aligned on a page in points, whereby the properties can be set directly using code or they can be taken from another source as an input mask or a configuration dataset. For instance, by providing an input mask or configuration dataset, program users can customize the positioning of the image objects within the page's header themselves. For more information, see the example Alignment of Header Objects.

public class UserPlaceableImage : UserPlaceableObject
Inheritance
UserPlaceableImage
Derived
Inherited Members

Examples

public class ExampleReport : HeaderFooterReport {
  public ExampleReport() {
    ImageData image = new ImageJpegData("Example.jpg");
    Logo = new UserPlaceableImage(image, ContentWidth, AlignHor.Right, -50, AlignVert.Top, 100);
  }

Constructors

UserPlaceableImage()

Initializes a new instance of the UserPlaceableImage class with default settings.

public UserPlaceableImage()

Remarks

The properties of the class HeaderFooterReport with type UserPlaceableImage do not accept null values. In these cases, this default object can be assigned.

UserPlaceableImage(ImageData?, double, AlignHor, double, AlignVert, double?, double?)

Initializes a new instance of the UserPlaceableImage class with specified image data, positioning and alignment in points.

public UserPlaceableImage(ImageData? imageData, double x, AlignHor alignHor, double y, AlignVert alignVert, double? width = null, double? height = null)

Parameters

imageData ImageData

The image data.

x double

The horizontal position of the image in points.

alignHor AlignHor

The horizontal alignment of the image.

y double

The vertical position of the image in points.

alignVert AlignVert

The vertical alignment of the image.

width double?

The width of the image in points. Defaults to null, which means that the width is calculated proportionally based on the height or if the height is null too, it sets the original width of the image.

height double?

The height of the image in points. Defaults to null, which means that the height is calculated proportionally based on the width or if the width is null too, it sets the original height of the image.

UserPlaceableImage(double, AlignHor, double, AlignVert, double?, double?)

Initializes a new instance of the UserPlaceableImage class with specified positioning and alignment in points. As the image data is not set, this element is not displayed as long as the ImageData property is not set.

public UserPlaceableImage(double x, AlignHor alignHor, double y, AlignVert alignVert, double? width = null, double? height = null)

Parameters

x double

The horizontal position of the image in points.

alignHor AlignHor

The horizontal alignment of the image.

y double

The vertical position of the image in points.

alignVert AlignVert

The vertical alignment of the image.

width double?

The width of the image in points. Defaults to null, which means that the width is calculated proportionally based on the height or if the height is null too, it sets the original width of the image.

height double?

The height of the image in points. Defaults to null, which means that the height is calculated proportionally based on the width or if the width is null too, it sets the original height of the image.

Properties

Height

Gets or sets the height of the image in points. If the value is null, the height is calculated proportionally based on the width or if the width is null too, it sets the original height of the image.

public double? Height { get; set; }

Property Value

double?

The height of the image in points, nullable.

HeightMM

Gets or sets the height of the image in millimeters. If the value is null, the height is calculated proportionally based on the width or if the width is null too, it sets the original height of the image.

public double? HeightMM { get; set; }

Property Value

double?

The height of the image in millimeters, nullable.

ImageData

Gets or sets the image data of this object. If the value is null, the object will not be created.

public ImageData? ImageData { get; set; }

Property Value

ImageData

The image data object, nullable.

Width

Gets or sets the width of the image in points. If the value is null, the width is calculated proportionally based on the height or if the height is null too, it sets the original width of the image.

public double? Width { get; set; }

Property Value

double?

The width of the image in points, nullable.

WidthMM

Gets or sets the width of the image in millimeters. If the value is null, the width is calculated proportionally based on the height or if the height is null too, it sets the original width of the image.

public double? WidthMM { get; set; }

Property Value

double?

The width of the image in millimeters, nullable.

See Also