GetPageTextArea seems not working

Discussions about PDF management.
Post Reply
smettraux
Posts: 1
Joined: Wed Mar 05, 2014 11:00 am

GetPageTextArea seems not working

Post by smettraux » Wed Mar 05, 2014 11:13 am

hello
i am trying to use GetPageTextArea but it seems it is not working (status is OK).
It sends back always an empty string.

on one line I use DrawTextBox (working fine)
and the next line I create a loop to determine approximately the height of the text written. But because GetPageTextArea sends always an empty string, then it is drawing the following image always on the top of the page.

Code: Select all

  gd.DrawTextBox(fn, 20, 20, 190, 190, GdPicture10.TextAlignment.TextAlignmentNear, GdPicture10.TextAlignment.TextAlignmentNear, Me.Texte)
            Dim h As Single = 0
            For i As Integer = 10 To 200 Step 20
                h = i
                Dim txt = gd.GetPageTextArea(0, i, gd.GetPageWidth - 3, 100)
                Dim stat = gd.GetStat
                If txt = "" Then Exit For
            Next
            h += 20

Dim rn = gd.AddImageFromBitmap(SignatureImage, False, False)
            res = gd.DrawImage(rn, 20, h, 70, 17.5)
Any idea ?

By the way, I tried to pass inches to the GetPageTextArea function, because the Intellisense comments are saying that it is inches (my doc is in mm), but no success either.

blewis
Posts: 38
Joined: Wed May 18, 2011 4:28 am

Re: GetPageTextArea seems not working

Post by blewis » Sat Mar 08, 2014 8:17 pm

I have a similar need. I take dynamic text input from a user (via web form textarea) and then need to draw that text onto the PDF page. However, I then need to draw additional elements below the text, so I need to know how much height the DrawTextBox method used on the page. Additional ideas would be helpful.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest