AddImageToDocument
Structure
AddImageToDocument(sDocFile, sImageFile: String; iTop, iLeft, iMaxHeight, iMaxWidth, iTransparency: Integer; bBox, bDeleteImageAfter: Boolean; sCaption: String; bFirstPageOnly: Boolean): Char
Parameters
| Parameter | Type | Description |
|---|---|---|
sDocFile | String | the original file to be updated |
sImageFile | String | the image file to be added |
iTop | Integer | position of the image - top |
iLeft | Integer | position of the image - left |
iMaxHeight | Integer | Maximum height of the image - if the image is larger it will be scaled |
iMaxWidth | Integer | Maximum width of the image - if the image is larger it will be scaled |
iTransparency | Integer | Transparency - percentage between 0 and 100 |
bBox | Boolean | True or False - shows a box around the image |
bDeleteImageAfter | Boolean | Delete the image file after it is added to the document (deletes from the IndySoft Temp directory) |
sCaption | String | If populated this text will be shown as a caption beneath the image |
bFirstPageOnly | Boolean | True or False - whether you would like the image only added to the first page of the document or all pages |
Return value
Char
'1' = Success, '0' = Failure. Success means the newly updated file exists
Description
Use this function to automatically add an image to a pdf file previously created. Note: position parameters are in units that are exactly 1/72 inches per unit, which is approximately the same as a "point", a unit used in the printing industry. 25.4 millimetres is one inch.