AddHTMLTextToDocumentPageNum
Structure
AddHTMLTextToDocument(sDocFile, sHTMLText: String; iPageNum, iTop, iLeft, iWidth, iTransparency: Integer): Char
Parameters
| Parameter | Type | Description
| sDocFile | String | the original file to be updatedsHTMLText | String | the HTML text to be addediPageNum | Integer | page number where HTML should be drawniTop | Integer | position of the text - topiLeft | Integer | position of the text - leftiWidth | Integer | Width of the text. Any remaining text will be drawn on a new line belowiTransparency | Integer | Transparency - percentage between 0 and 100 |
Return Value
Char
'1' = Success, '0' = Failure. Success means the newly updated file exists
Description
Use this function to automatically add html text to a specific page in a pdf file previously created. 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.
HTML Formatting - A limited HTML subset is supported:
<br> to break onto a new line
<b> or <strong> for bold
<i> or <em> for italics
<sup> and <sub> for superscript/subscript.
<u> for underline
<u> for double underline
<u> for strikeout (a line drawn through the text)
<u> for a line drawn above the text
<p align="left"> for left aligned paragraphs
<p align="center"> for centered paragraphs
<p align="justified"> for justified paragraphs
<ul>, <ol> and <li> for ordered/unordered lists
<a href="http://..."> for web links
<a href="https://..."> for web links
<a href="file://..."> for local file links
<font
size="__"
color="__"
background="__"
roundback="yes/no"
mode="__"
outlinecolor="__"
outlinewidth="__pt"
>
<span background="__" roundback="yes/no">
The font size can be specified as a standard HTML size, or a point size such as "11.5pt", the outline width must be specified in points, for example "1.5pt".
Text and background colors can be specified in RGB using the standard HTML hexadecimal notation, for example "#3A498C". CMYK colors can be specified using eight
hexadecimal values and omitting the #, for example "5C238F02".
If the roundback attribute is "yes", the background rectangles will be drawn with rounded edges.
Example
sHTMLText =
"<p align=""center"">" &
"Certificate is now:<br>" &
"<span background=""#FF0000"">" &
"<font size=""12"" color=""#FFFFFF"">" &
"<b><i> APPROVED </i></b>" &
"</font>" &
"</span><br>" &
"for details goto <u><a href=""http://www.indysoft.com"">indysoft.com</a></u>" &
"</p>"
if AddHTMLTextToDocumentPageNum(GetCurrentSignOffDoc, sHTMLText, 1, 130, 240, 400, 0) = "0" then
ShowMessage("Document was NOT modified")
End If
|