Skip to main content

AddImageToDocumentPageNum

Structure

AddImageToDocumentPageNum(sDocFile, sImageFile: String; iPageNum, iTop, iLeft, iMaxHeight, iMaxWidth, iTransparency: Integer; bBox, bDeleteImageAfter: Boolean; sCaption: String): Char

Parameters

ParameterTypeDescription
sDocFileStringthe original file to be updated
sImageFileStringthe image file to be added
iPageNumIntegerthe page number where the image should be applied (the only page affected by this function)
iTopIntegerposition of the image - top
iLeftIntegerposition of the image - left
iMaxHeightIntegerMaximum height of the image - if the image is larger it will be scaled
iMaxWidthIntegerMaximum width of the image - if the image is larger it will be scaled
iTransparencyIntegerTransparency - percentage between 0 and 100
bBoxBooleanTrue or False - shows a box around the image
bDeleteImageAfterBooleanDelete the image file after it is added to the document (deletes from the IndySoft Temp directory)
sCaptionStringIf populated this text will be shown as a caption beneath the image

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 that this function is slightly different than AddImageToDocument function - this version only applies the image to one specific page (iPageNum). 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.