DynaPDF SetTextRect problem

I want to have a number of ‘areas’ in one PDF page, and to WriteText within those using alignment.

What I am finding is that issuing a SetTextRect is forcing a new page to happen, so instead of one page with things on it, I have several pages with one thing on each.
Is this expected?

in the PageBreak event, you can customize this. If no page break event is set, you get a new page automatically.

e.g. you can do this:

EventHandler Function PageBreak(LastPosX as double, LastPosY as double, PageBreak as boolean) As integer
  If Flag Then
    Call Me.setTextRect(320, 100, 200, 600)
    Flag = False
  Else
    Call Me.EndPage
    Call Me.Append
    Call Me.setTextRect(100, 100, 200, 600)
    Flag = True
  end if

  Return 0
End EventHandler

To swap between left and right column and then make a new page.

1 Like