This is a migrated thread and some comments may be shown as answers.

Exporting to word spacing

1 Answer 86 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 Oct 2014, 07:39 AM
Hi, 

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 ?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 13 Oct 2014, 01:53 PM
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.


Regards,
Dimitar
Telerik
 

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.

 
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Paul
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or