in

C1 Community

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

Y-Position of Currentpage after RenderArea/RenderRTFText

Last post 02-28-2008 8:12 AM by alexanderm. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-21-2008 8:12 AM

    Y-Position of Currentpage after RenderArea/RenderRTFText

     I render a long RTF-Text via RenderArea or RenderRichText. When the Text ends e.g. on the second or third Page I need the excact Y-Positon of the last line or the next new line. We use our own Formulardesigner and I must calculate the Position of the next object with values from the c1Preview in conjunction with our Formulardesin-Values. We use the Version 2.0.20072.42005 of C1Preview.

    regards 

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

    Re: Y-Position of Currentpage after RenderArea/RenderRTFText

    You can use properties of C1PrintDocument:

            /// Gets the current generating area of page, returns null if document in not generating state.
            public PageAreaBase CurrentPageArea { get; }

            /// An amount of available vertical space in the block flow in the currently
            /// generating page area, value specified in the ResolvedUnit units.
            /// Returns -1 if document in not generating state.
            public double AvailableBlockFlowHeight { get; }

            /// An amount of available horizontal space in the block flow in the currently
            /// generating page area, value specified in the ResolvedUnit units.
            /// Returns -1 if document in not generating state.
            public double AvailableBlockFlowWidth { get; }

    I have attached small sample 

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