Overflow Formatted TextArea

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for COM/ActiveX (v4.x)  /  Display Thread

DynamicPDF Generator for COM/ActiveX (v4.x) Forum

 Jul 21 2010 1:25 PM
I have a OverflowFormattedTextArea that I want to be a different height than the FormattedTextArea. I've used the example from FormattedTextContinuation.asp.

I have the text in two columns on the first page at 200px in height. I want additional pages to fill the whole page, but they are only filling to 200px. Is there a way for OverflowFormattedTextArea to control the height?
 Jul 21 2010 3:15 PM
Posted by a ceTe Software moderator
Hello,

Currently it is not possible to change the width of the FormattedTextArea. You can change the X and Y properties by using the GetOverflowFormattedTextArea method which takes these values as parameters.

A work around would be to use TextArea page element that allows you to get the overflow text and then adding the overflow text to a new TextArea on second page with the desired height.

Thanks,
ceTe Software Support Team
 Jul 26 2010 7:58 PM
I don't seem to see how to do this. Can you give me an example of how you would set a desired height on a second page with a new TextArea?
 Jul 27 2010 9:57 AM
Posted by a ceTe Software moderator
Hello,

You can have different X, Y, Width and Height for the new TextArea page without any problem. You will have to create a new TextArea object when you have an overflow text. Below is a sample code for this.

   Dim MyDocument  As New DynamicPDF.Document
   Dim MyText As String
   MyText = "A Very Big String"

   Dim MyPage As DynamicPDF.page
   Dim MyTextArea As TextArea

   Dim width As Single
   Dim height As Single
   Dim x As Single
   Dim y As Single

   Dim temp As Integer
   temp = 1

   Do
      'Some logic to change X, Y width and height
      If (temp Mod 2 = 0) Then
         x = 0
         y = 0
         width = 200
         height = 200
      Else
         x = 100
         y = 100
         height = 400
         width = 300
      End If

      Set MyPage = MyDocument.AddPage()
      Set MyTextArea = MyPage.AddTextArea(MyText, x, y, width, height)
      MyText = MyTextArea.OverFlowText()

      temp = temp + 1
   Loop While Not (MyText = "")

   MyDocument.DrawToFile ("C:\Temp\output.pdf")
   Set MyPage = Nothing
   Set MyDocument = Nothing

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 9:32 AM.