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

Remove top and bottom margins & export of french accents

5 Answers 150 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
BRUNO
Top achievements
Rank 1
BRUNO asked on 16 May 2012, 09:40 AM
Hi,

I have two issues:
  • I set the fontfamily of my richtextbox  at Trebuchet MS. When I write in it, everything is ok, but when I export it in word, my french accents are in Times New Roman.
                      
<telerik:RadRichTextBox  Name="rtb_utilisateur" IsSpellCheckingEnabled="false" FontFamily="Trebuchet MS" FontSize="11" DocumentInheritsDefaultStyleSettings="True" >

  • I want to remove the top and bottom margins, (I need my header and footer to be just on the border of the paper). I tried these three methods :
rtb_utilisateur.Document.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(0)
 
footerDoc.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(0)
headerDoc.SectionDefaultPageMargin = New Telerik.Windows.Documents.Layout.Padding(0)
 
firstSection.PageMargin = PageMarginTypesConverter.ToPadding(PageMarginTypes.Narrow)
But it did'nt worked. It only removed the left and right margins !
I'm using Silverlight 4 and Q3 2011.
Thanks,

5 Answers, 1 is accepted

Sort by
0
Andrew
Telerik team
answered on 19 May 2012, 12:29 PM
Hi Bruno,

We could not reproduce the export problem you are describing. On our end everything seems to work as expected. It would help if you can send us some sample text in French we can try with, or open a support ticket and send us a sample application that reproduces the problem.
About your second issue: RadRichTextBox has methods called ChangeSectionHeaderTopMargin(int) ChangeSectionFooterBottomMargin(int) that you can use to decrease the distance from the top of the page; alternatively you can set HeaderTopMargin and FooterBottomMargin properties directly to the Section in question, for example:

Section firstSection = rtb_utilisateur.Document.Sections.First();
firstSection.HeaderTopMargin = 0;
firstSection.FooterBottomMargin = 0;

Kind regards,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
BRUNO
Top achievements
Rank 1
answered on 22 May 2012, 11:52 AM
Sample text in french : échantillon de texte en français destiné à être testé.

Thank you for the second answer, but I still have some issues. My header is now on the border of the paper, but I would also like to decrease the distance of the content of the document to the header. Moreover, when I export my document in word, my top margin comes back.

Regards,

0
Andrew
Telerik team
answered on 25 May 2012, 12:56 PM
Hi Bruno,

We created a project with all the properties set as you described and entered the text you provided. Upon export everything seems to work as expected. All the text is with Trebuchet MS font when opened in MS Word. We would very much appreciate if you open a support ticket and send us a sample project with some steps on how to input some text that eventually will be exported wrong.
On your second issue - you can use SectionDefaultPageMargin property to decrease the distance between the text and the header. For example if you want to decrease only the distance from the top, you can do something like:

Padding padding = this.editor.Document.SectionDefaultPageMargin;
this.editor.Document.SectionDefaultPageMargin = new Padding(padding.Left, 0, padding.Right, padding.Bottom);
Unfortunately, we have a bug in our export as you mentioned, which we will fix in the Q2 2012 release which is about to come up in a few weeks. We updated your Telerik points in appreciation for the bug report. Regards,
Andrew
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
BRUNO
Top achievements
Rank 1
answered on 29 May 2012, 02:37 PM
I created a support ticket :
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=548903

Thanks,
0
Accepted
Iva Toteva
Telerik team
answered on 29 May 2012, 05:46 PM
Hello Bruno,

The support ticket you opened has already been answered. It seems that the issue you are observing has been resolved in the latest version of the controls.

If you have additional comments, please share them either here or in the support thread.

Greetings,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
BRUNO
Top achievements
Rank 1
Answers by
Andrew
Telerik team
BRUNO
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or