Method ResizeImage
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
documentWordDocumentThe document that holds the picture.
imageImageRefThe picture.
widthEmuThe new width, above zero and at most MaxImageSide.
heightEmuThe 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
documentorimageis 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.