Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordTemplateImage

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Describes an embedded image supplied to a Word template placeholder.

Inheritance

  • object
  • WordTemplateImage

Constructors

public WordTemplateImage(byte[] content, string fileName, OfficeLength? width = null, OfficeLength? height = null, string altText = "") #

Creates an embedded image value from encoded image bytes.

Parameters

content byte[] required
Encoded image bytes, such as PNG or JPEG content.
fileName string required
File name with an extension that identifies the image format.
width OfficeIMO.OfficeLength? = null optional
Optional placed width; omitted dimensions use the image aspect ratio or intrinsic size at 96 DPI.
height OfficeIMO.OfficeLength? = null optional
Optional placed height; omitted dimensions use the image aspect ratio or intrinsic size at 96 DPI.
altText string = "" optional
Alternative text stored with the image.

Properties

public byte[] Content { get; } #

Gets a copy of the encoded image bytes.

public string FileName { get; } #

Gets the image file name used to identify its format.

public OfficeLength? Width { get; } #

Gets the optional placed image width.

public OfficeLength? Height { get; } #

Gets the optional placed image height.

public string AltText { get; } #

Gets the image alternative text.