Mulipage PDF

Mulipage PDF

Forum member · Jan 15, 2010
I am using FormattedTextArea and I have the overflow working great. The problem is, the PDF is using a letterhead template, in which the first page contains a Header, Footer, and Sidebar; any additional pages only contains the footer. Therefore, the text on the rest of the pages will have different X, Y, Width, and Height properties. Is there anyway around not being able to change the width of the textarea on the additional pages? Dim MyDocument As New Document() Dim style As FormattedTextAreaStyle = New FormattedTextAreaStyle(FontFamily.Times, 12, False) Dim MyTextArea As FormattedTextArea = New FormattedTextArea(RadEditor1.Content, 202, 161, 372, 517, style) Dim i As Integer = 0 Do Dim MyPage As Page = New Page() With MyPage.Dimensions .TopMargin = 0 .LeftMargin = 0 .BottomMargin = 0 .RightMargin = 0 End With If i = 0 Then MyPage.Elements.Add(New Image(Server.MapPath("Assetts") & "/PDFCreator/Header.jpg", 0, 0)) MyPage.Elements.Add(New Image(Server.MapPath("Assetts") & "/PDFCreator/list.jpg", 0, 123)) MyPage.Elements.Add(New Image(Server.MapPath("Assetts") & "/PDFCreator/footer.jpg", 0, 699)) MyPage.Elements.Add(MyTextArea) MyDocument.Pages.Add(MyPage) 'MyTextArea = MyTextArea.GetOverflowFormattedTextArea() ElseIf i > 0 Then MyPage.Elements.Add(New Image(Server.MapPath("Assetts") & "/PDFCreator/footer.jpg", 0, 699)) Dim MyTextArea2 As FormattedTextArea = New FormattedTextArea("a", 84, 90, 490, 592, style) 'MyTextArea.GetOverflowFormattedTextArea.Width = 490 MyTextArea2 = MyTextArea.GetOverflowFormattedTextArea MyPage.Elements.Add(MyTextArea2) MyDocument.Pages.Add(MyPage) MyTextArea = MyTextArea2.GetOverflowFormattedTextArea() End If i += 1 Loop While Not (MyTextArea Is Nothing) MyDocument.Draw("C:\MyDocument.pdf")

Re: Mulipage PDF

Support · Jan 15, 2010
Hello, You can use the overlaoded GetOverflowFormattedTextArea method that takes X, Y and Height paramters for the overflow TextArea. public FormattedTextArea GetOverflowFormattedTextArea( float x, float y, float height ) You can not control the width of the overflow FormattedTextArea. Thanks, ceTe Software Support Team