Skip to main content

AddBoxToDocument

Structure

AddBoxToDocument(sDocFile; iTop, iLeft, iWidth, iHeight, iTransparency, iDrawOptions, iRed, iGreen, iBlue: Integer; bFirstPageOnly: Boolean): Char

Parameters

ParameterTypeDescription
sDocFileStringthe original file to be updated
iTopIntegerposition of the box - top
iLeftIntegerposition of the box - left
iWidthIntegerWidth of the box.
iHeightIntegerHeight of the box.
iTransparencyIntegerTransparency - percentage between 0 and 100
iDrawOptionsInteger0 = Outline

1 = Fill

2 = Fill and outline
iRedIntegerThe red component of the color. The values of the color parameters range from 0 to

1, with 0 indicating 0% and 1 indicating 100% of the color.
iGreenIntegerThe green component of the color. The values of the color parameters range from 0 to

1, with 0 indicating 0% and 1 indicating 100% of the color.
iBlueIntegerThe blue component of the color. The values of the color parameters range from 0 to

1, with 0 indicating 0% and 1 indicating 100% of the color.
bFirstPageOnlyBooleanTrue or False - whether you would like the box 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 a box to a pdf file previously created. This text can be added to all pages, or only the first page, based upon last parameter. 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.

Example

if AddBoxToDocument("C:\Temp\testpdf.pdf", 600, 300, 135, 50,

0, 0,

100, 0, 0, True) = "0" then
ShowMessage("Document was NOT modified")
End If