'DrawTo Example
Set TK = CreateObject("APToolkit.Object")
r = TK.OpenOutputFile("DrawTo.pdf")
'Draw a border around the PDF
strPageWidth = 612 '8.5" (72 = 1")
strPageHeight = 792 '11" (72 = 1")
strSpace = 20 'Space between edge of page and border
'Top of the page line
TK.MoveTo strSpace, strPageHeight - strSpace, 0
TK.DrawTo strPageWidth - strSpace, strPageHeight - strSpace, 0
'Left of the page line
TK.MoveTo strPageWidth - strSpace, strPageHeight - strSpace, 0
TK.DrawTo strPageWidth - strSpace, strSpace, 0
'Bottom of the page line
TK.MoveTo strSpace, strSpace, 0
TK.DrawTo strPageWidth - strSpace, strSpace, 0
'Right of the page line
TK.MoveTo strSpace, strSpace, 0
TK.DrawTo strSpace, strPageHeight - strSpace, 0