Skip to main content

AddBoxToDocumentPageNum

Structure

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

Parameters

ParameterTypeDescription
sDocFileStringthe original file to be updated
iPageNumIntegerPage where you want the box added
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.

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 single page in a pdf file previously created. Specify the page using the 2nd iPageNum 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 AddBoxToDocumentPageNum("C:\Temp\testpdf.pdf", 2, 600, 300, 135, 50,

0, 0,

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