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)
Syntaxpublic void Add(
string pImageFile,
double pTop,
double pLeft,
double pWidth = 0,
double pHeight = 0,
BannerPages pPage = BannerPages.Default
)
Public Sub Add (
pImageFile As String,
pTop As Double,
pLeft As Double,
Optional pWidth As Double = 0,
Optional pHeight As Double = 0,
Optional pPage As BannerPages = 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
double lLeft = 7.2;
double lTop = 0.7;
double lWidth = 5.6;
double lHeight = 0;
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