Exporting to word spacing

2 posts, 0 answers
  1. Gavin
    Gavin avatar
    1 posts
    Member since:
    Apr 2009

    Posted 09 Oct 2014 Link to this post


    We are using a RadDocument using the paged layout to show tabular content.
    We create a table and inside each row we place some paragraphs. These paragraphs may have "SpaceAfter" property to zero, one or two lines. 

    One requisite of our application is to know how many rows are in each of the pages, so we can insert an extra row at the bottom of each page summarising the page rows and save it as a word document.

    We were using the method "GetAssociatedLayoutBoxes" to get the layout box associated with each row and its heigth. However it seems that the size of the box is different than the actual size when exported to word using the DocxExporter.

    It seems that the layout engine works different in RadRichTextBox than MS Word. For example, if I open the same document using word it appears that 12 rows are shown on the first page, but if I open the same document using RadRichTextEditor there will be 16 rows shown on the first page. The page margins are the same in both cases.

    After deeply looking at the differences I would think that difference is due mainly to two things:
    - The "SpaceAfter" property is rendered diffently by MS Word than the richtextbox
    - The table borders take some space in MS Word and push the content down, but they do not behave in the same way on Radrichtexteditor. Even more, if I increase the table border width, the table seems to "grow" towards inside the cell instead of increasing the table height and width.

    Is there any suggested workaround for this?
     Will this be handled differently on Q3 2014 ?

  2. Dimitar
    Dimitar avatar
    2165 posts

    Posted 13 Oct 2014 Link to this post

    Hello Gavin,

    Thank you for writing.

    This is a known issue with RadRichTextBox for WinForms. It it logged in our Feedback Portal. You can track the item for status changes and add your vote for it here.
    To workaround it you can set the SpacingAfter property to 0.01.

    Please note that we are not trying to follow the exact behavior of Microsoft Word and in some cases the behavior may differ. Nevertheless I have logged this in our Feedback Portal so our developers can take a look at it. You can track the item for status changes and add your vote for it here.

    Your Telerik Points have been updated for this report.

    Should you have any other questions do not hesitate to ask.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top