in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Problems with RTF - Text

Last post 02-29-2008 5:53 AM by alexanderm. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-21-2008 11:07 AM

    Problems with RTF - Text

    When a Pagebreak occours during the rendering of an RenderRichText the text ist printed on the top of the new page. How can I set the information of the y position of the text on the new page. I have made a screenshot to show my Problems. Regards

    RTF Problem 

     

  • 02-28-2008 8:23 AM In reply to

    Re: Problems with RTF - Text

    I'm not sure I understand what info you need. Could you clarify please? 

    Cheers,
    Dima.
  • 02-28-2008 10:16 AM In reply to

    Re: Problems with RTF - Text

    Hi Dima, thanks for reply!  My Problem: If there is a pagebreak in an RTFText (see the sample below) one part of the text is on the fist page, and the other part is on the second page. I need the Height of the piece of  RTFText  from the second page or better the CurrentY-Position (like in the  VSView8.OCX)  to print further objects. AvailableBlockFlowHeight works not with RenderRTFText, I get always the same Value!

    Thanks, Regards 

     Sample:
            rrtf.Load(RTFFile_1)

            rrtf.X = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)
            rrtf.Y = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)
            rrtf.Width = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)

            Me.C1PrintDocument1.Body.Children.Add(rrtf)


            dHeight = rrtf.CalcSize(rrtf.Width, Unit.Auto).Height

            Dim Text1 As New RenderText
            Text1.Y = New Unit(dHeight + VALUEFROMDATABASE, UnitTypeEnum.Mm)
            Text1.X = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)
            Text1.Text = "DEMO ......"

            Me.C1PrintDocument1.Body.Children.Add(Text1)

            dHeight = Text1.CalcSize(VALUEFROMDATABASE, Unit.Auto).Height

            rrtf.Load(RTFFile_2)

            rrtf.X = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)
            rrtf.Y = New Unit(dHeight + VALUEFROMDATABASE, UnitTypeEnum.Mm)
            rrtf.Width = New Unit(VALUEFROMDATABASE, UnitTypeEnum.Mm)

            Me.C1PrintDocument1.Body.Children.Add(rrtf)
            dHeight = rrtf.CalcSize(rrtf.Width, Unit.Auto).Height

  • 02-29-2008 5:53 AM In reply to

    Re: Problems with RTF - Text

    As I have understood you use StartDoc() / Render... / EndDoc() methods to generate a document.
    In this case you can get all measured info directly from object after RenderBlock() or RenderDirectMethod().

     
    I have attached a small example.
     

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.