AddBoxToDocumentPageNum
Structure
AddBoxToDocument(sDocFile; iPageNum, iTop, iLeft, iWidth, iHeight, iTransparency, iDrawOptions, iRed, iGreen, iBlue: Integer): Char
Parameters
| Parameter | Type | Description |
| sDocFile | String | the original file to be updated |
| iPageNum | Integer | Page where you want the box added |
| 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. |
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