AddBoxToDocument
Structure
AddBoxToDocument(sDocFile; iTop, iLeft, iWidth, iHeight, iTransparency, iDrawOptions, iRed, iGreen, iBlue: Integer; bFirstPageOnly: Boolean): Char
Parameters
| Parameter | Type | Description |
| sDocFile | String | the original file to be updated |
| iTop | Integer | position of the box - top |
| iLeft | Integer | position of the box - left |
| iWidth | Integer | Width of the box. |
| iHeight | Integer | Height of the box. |
| iTransparency | Integer | Transparency - percentage between 0 and 100 |
| iDrawOptions | Integer | 0 = Outline
1 = Fill
2 = Fill and outline |
| iRed | Integer | The 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. |
| iGreen | Integer | The 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. |
| iBlue | Integer | The 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. |
| bFirstPageOnly | Boolean | True 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