Click or drag to resize

ImageAdd Method (String, Double, Double, Double, Double, BannerPages)

Added an image to fix position (anchor in header)

Namespace:  SOWIDocument.Word
Assembly:  SOWIDocument.Word (in SOWIDocument.Word.dll) Version: 22.2.10.1 (22.2.10.450)
Syntax
public void Add(
	string pImageFile,
	double pTop,
	double pLeft,
	double pWidth = 0,
	double pHeight = 0,
	BannerPages pPage = BannerPages.Default
)

Parameters

pImageFile
Type: SystemString
Image file
pTop
Type: SystemDouble
Top position from page in centimetre
pLeft
Type: SystemDouble
Left position from page in centimetre
pWidth (Optional)
Type: SystemDouble
Image width in centimetre
pHeight (Optional)
Type: SystemDouble
Image height in centimetre
pPage (Optional)
Type: SOWIDocument.WordBannerPages
Image to place of header page (default, first, even)
Remarks
Can parameter pWidth or parameter pHeight specify so will calculate image size automatic.

The image store in document.

Examples
This example added a logo image at fix position
//* declaration position and size *
double lLeft = 7.2;     // cm
double lTop = 0.7;      // cm
double lWidth = 5.6;    // cm
double lHeight = 0;     // cm

SOWIDocument.Word.Document lDOC = new SOWIDocument.Word.Document("Brief.doc");
lDOC.Image.Add("Logo.emf", lTop, lLeft, pWidth: lWidth, pHeight: lHeight);
lDOC.Close();
See Also