|
Draw a text on specific page of PDF.
Public Function PDFDrawText( _ ByVal iPageNo As String, _ ByVal iX As Integer, _ ByVal iY As Integer, _ ByVal strText As String, _ ByVal iFontID As Integer, _ ByVal iFontSize As Integer, _ ByVal iRotation As Integer ) As bool
|
Parameter
iPageNo specifies page no. for draw a text. The first page is zero index.
The iX, iY unit is Centimeters. 10000 = 1 CM. iX specifies the x-coordinate of the upper-left corner of the text to draw.
iY specifies the y-coordinate of the upper-left corner of the text to draw.
strText the string of text to draw.
iFontID specifies the font ID.
iFontSize specifies the size of font.
iRotation specifies a rotation angle of the text in degree. The value from 0-360.
Return Value
Return true if successful. Return false if failed.
Example
|
Visual Basic Syntax Scanner1.PDFInitAnnotation FontID = Scanner1.PDFAddFont("Arial", True, True) Scanner1.PDFSetTextColor 255, 0, 255 Scanner1.PDFDrawText 0, 10000 , 20000 , "This is sample text 1 ", FontID, 40, 0 Scanner1.SaveAllPage2PDF "c:\newpage.pdf", True , 1
|
|
|