Table of Contents

Method ResizeImage

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

ResizeImage(WordDocument, ImageRef, Emu, Emu)

Sets the displayed size of a picture.

public static DocumentEdit ResizeImage(this WordDocument document, ImageRef image, Emu width, Emu height)

Parameters

document WordDocument

The document that holds the picture.

image ImageRef

The picture.

width Emu

The new width, above zero and at most MaxImageSide.

height Emu

The new height, above zero and at most MaxImageSide.

Returns

DocumentEdit

The edit; Before is just before the picture and After just past it.

Exceptions

ArgumentNullException

document or image is null.

ArgumentException

The picture is not in document, or not in a paragraph.

ArgumentOutOfRangeException

A side is not above zero, or is above MaxImageSide.

InvalidOperationException

The picture's drawing is not one DrawingML picture (a VML picture, a group, no preserved drawing), or it is in a shape's text box.