Click or drag to resize

ImageGetDrawing Method

Gives a drawing object with an image back

Namespace:  SIC.OpenDocumentFormat.MSWord
Assembly:  SIC.OpenDocumentFormat (in SIC.OpenDocumentFormat.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
private Drawing GetDrawing(
	string pImageFile,
	double pTop = 0,
	double pLeft = 0,
	double pWidth = 0,
	double pHeight = 0,
	OpenXmlPart pPart = null
)

Parameters

pImageFile
Type: SystemString
Image file
pTop (Optional)
Type: SystemDouble
Top position from page in centimetre
pLeft (Optional)
Type: SystemDouble
Left position from page in centimetre
pWidth (Optional)
Type: SystemDouble
Width in centimetre
pHeight (Optional)
Type: SystemDouble
Height in centimetre
pPart (Optional)
Type: OpenXmlPart
Open XML part store the image. Details see method AddImageToPart(String, OpenXmlPart)

Return Value

Type: Drawing
A image object for further processing example adds to document content
Remarks
The image store in document.

The image extents read from this image object property Anchor.Extent.Cx and Cy

If parameter pTop greater null then gives an image in an anchor object otherwise an in line object (paragraph).

See Also