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

Export to docx problem

4 Answers 97 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Luciano
Top achievements
Rank 1
Luciano asked on 24 Aug 2010, 07:49 AM
Hi, I was using Telerik Word sample; I changed the font of the selected text from Verdana 12 to Verdana 10.
When I saved the document  (Docx Format) and I opened it with Microsoft Word 2007 Italian I got an error (See the attached image) 

This is the part of the Docx generated by word sample with new font Verdana 10  and i Think 19,995 is not supported

<

 

 

w:rPr>

 

<

 

 

 

w:rFonts w:ascii="Verdana" w:hAnsi="Verdana" />

 

<

 

 

 

w:sz w:val="19,995" />

 

<

 

 

 

w:b w:val="0" />

 

<

 

 

 

w:i w:val="0" />

 

<

 

 

 

w:color w:val="000000" />

 

<

 

 

 

w:highlight w:val="none" />

 

<

 

 

 

w:vertAlign w:val="baseline" />

 

<

 

 

 

w:u w:val="none" w:color="000000" />

 

<

 

 

 

w:strike w:val="0" />

 

</

 

 

 

w:rPr>

 

<

 

 

 

w:t xml:space="preserve">codebase with Telerik WPF</w:t>

 

</

 

 

 

w:r>

 

 

4 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 24 Aug 2010, 11:49 AM
Hello Luciano,

You are right, there is an issue with exporting some font sizes correctly. It will be fixed immediately and will be available in the next Latest Internal Build.
Thanks for this bug report - your Telerik points are updated in your profile.

Best wishes,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
MI Pro
Top achievements
Rank 1
answered on 24 Feb 2011, 09:42 AM
Hi,

I am using version 2010.3.1314.1040 and I have the exact same issue when changing font-size. For example, when setting the font-size to '16' and then exporting this using your formatprovider, I get the following result in the word document:

<w:rFonts w:ascii="Verdana" w:hAnsi="Verdana" />
   <w:sz w:val="31.995" />

When I re-save this in Word, I get the following output:

<w:sz w:val="31"/>

This is a bit of a show stopper for me since I use the Telerik-generated Word document as a start in a workflow where other components that post process the document does not support this.   

Any thoughts on this?

Thank you, Bjorn 
0
Iva Toteva
Telerik team
answered on 25 Feb 2011, 08:26 AM
Hi Bjorn,

How are you setting the font size? I managed to reproduce the issue only by setting the font size via the ribbon bar - RadRichTextBoxRibbonUI. We will fix it in one of the next internal builds, but as a workaround, you can set the rad combo box items in the XAML declaration of the ribbon bar as follows:

<telerik:RadRibbonComboBoxItem Content="8"  Tag="10.666666666666667" />
<telerik:RadRibbonComboBoxItem Content="9" Tag="12" />
<telerik:RadRibbonComboBoxItem Content="10" Tag="13.333333333333332" />
<telerik:RadRibbonComboBoxItem Content="11" Tag="14.666666666666667" />
<telerik:RadRibbonComboBoxItem Content="12" Tag="16" />
<telerik:RadRibbonComboBoxItem Content="14" Tag="18.666666666666667" />
<telerik:RadRibbonComboBoxItem Content="16" Tag="21.333333333333332" />
<telerik:RadRibbonComboBoxItem Content="18" Tag="24" />
<telerik:RadRibbonComboBoxItem Content="20" Tag="26.666666666666667" />
<telerik:RadRibbonComboBoxItem Content="22" Tag="29.333333333333332" />
<telerik:RadRibbonComboBoxItem Content="24" Tag="32" />
<telerik:RadRibbonComboBoxItem Content="26" Tag="34.666666666666667" />
<telerik:RadRibbonComboBoxItem Content="28" Tag="37.333333333333332" />
<telerik:RadRibbonComboBoxItem Content="36" Tag="48" />
<telerik:RadRibbonComboBoxItem Content="48" Tag="64" />
<telerik:RadRibbonComboBoxItem Content="72" Tag="96" />

You will see that the Tags that are generated automatically have smaller precision (digits after the decimal point).
Hope that helps. If you have other questions, do not hesitate to contact us again. 

Kind regards,
Iva
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
MI Pro
Top achievements
Rank 1
answered on 25 Feb 2011, 09:05 AM
Thanks Iva, this works for me.
Tags
RichTextBox
Asked by
Luciano
Top achievements
Rank 1
Answers by
Boby
Telerik team
MI Pro
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or