Skip to main content

AddRotatedTextBoxToDocument

Structure

AddRotatedTextToDocument(sDocFile, sText: String; iTop, iLeft, iWidth, iHeight, iAngle, iTransparency, iOptions, iBorder, iRadius, iDrawOptions, iTextAlign, iTextSize, iRed, iGreen, iBlue: Integer; bFirstPageOnly: Boolean): Char

Parameters

ParameterTypeDescription
sDocFileStringthe original file to be updated
sTextStringthe text to be added
iTopIntegerposition of the text - top
iLeftIntegerposition of the text - left
iWidthIntegerWidth of the text.
iHeightIntegerHeight of the text.
iAngleIntegerThe angle the box should be rotated around the top-left corner, measured

anti-clockwise in degrees
iTransparencyIntegerTransparency - percentage between 0 and 100
iOptionsInteger0 = Center vertical alignment

1 = Top vertical alignment

2 = Bottom vertical alignment

3 = Center vertical alignment, no wrapping

4 = Top vertical alignment, no wrapping

5 = Bottom vertical alignment, no wrapping
iBorderInteger0 = No Border

1 = Border

2 = Border with rounded corners
iRadiusIntegerRadius of the corner arcs
iDrawOptionsInteger0 = Outline

1 = Fill

2 = Fill and outline
iTextAlignInteger0 = Left aligned (default)

1 = Center aligned

2 = Right aligned

3 = Justified

4 = Force justified

5 = Last line justified

Anything else = Left aligned
iTextSizeIntegerThe text size in points
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 html text 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 rotated text 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

sText = " APPROVED "
if AddRotatedTextBoxToDocument(GetCurrentSignOffDoc, sText, 600, 300, 135, 50,
20, 0, 0, 2, 20, 2, 0, 20,
100, 0, 0, True) = "0" then
ShowMessage("Document was NOT modified")
End If

HM_clip3002