Fonts not exporting to RTF

13 posts, 0 answers
  1. Walter
    Walter avatar
    3 posts
    Member since:
    Feb 2014

    Posted 05 Aug 2014 Link to this post

    I have a RichTextBox control on my form.  I change the font and type some text.  It looks fine on screen.  I export the RadDocument to RTF using the RtfFormatProvider.  It changes the font to Calibri, no matter what I initially set it at.  Is there some trick to getting the RadDocument to export out the proper font?

  2. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 06 Aug 2014 Link to this post

    Hello Walter,

    Thank you for writing.

    We have a similar to this case already reported. However the issue in this case appear only when the rtf document is imported back to the richtextbox. This is why I wanted to ask you if you are importing the document or you are opening it with a different editor (WordPad)?

    More information about the already logged item is available here.

    I am looking forward to your reply.

    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Walter
    Walter avatar
    3 posts
    Member since:
    Feb 2014

    Posted 07 Aug 2014 in reply to Dimitar Link to this post

    1. Write document in Word 2010. Set font to Arial.
    2. Import into Telerik RichTextBox.  It looks fine, correct font and all.
    3. Export it to RTF.
    4. View RTF code.  The font has changed to Calibri.  Also, the font sizes are all reset to be the same if there were fonts with different point sizes.

    A workaround that kind of works, but not always is that after importing document into the RTF box, if you change the first letter to a different font, and then export it, it will SOMETIMES keep the rest of the document as the original font.  It appears that it does better when there are mixed fonts. 







  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 11 Aug 2014 Link to this post

    Hi Walter,

    Thank you for the detailed description.

    I was able to reproduce the issue and it appears that this is the same issue that is already logged. I have updated the issue internal description which will allow our developers to consider your description as well.

    Unfortunately I cannot provide you with a workaround for the issue.

    Do not hesitate to contact us if you have other questions.

    Regards,
    Dimitar
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 26 Aug 2015 Link to this post

    hello

    how to make less spaceing in line  radrichtexteditor

  7. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 27 Aug 2015 Link to this post

    Hello Mahmud,

    Thank you for writing.

    You can use the ChangeParagraphLineSpacing method:
    void button_Click1(object sender, EventArgs e)
    {
        this.radRichTextEditor1.Document.Selection.SelectAll();
        this.radRichTextEditor1.ChangeParagraphLineSpacing(2);
    }

    Let me know if you have additional questions.

    Regards,
    Dimitar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  8. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 27 Aug 2015 Link to this post

    i need clear radrichtexteditor im trying tow match but not fine 
  9. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 27 Aug 2015 Link to this post

    i need The biggest size form radrichtexteditor c# winforms 
  10. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 28 Aug 2015 Link to this post

    Hi Mahmud,

    I am sorry, I am having issues understanding both of these questions. Could you please elaborate?

    Regards,
    Dimitar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  11. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 28 Aug 2015 Link to this post

    first  one i need remove or clear data in radrichtexteditor 

    and in need large for textbox same word document size paper 

  12. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 29 Aug 2015 Link to this post

    hello

    i'm trying many time i need clear data in radrichtexteditor in c# 

  13. Mahmoud
    Mahmoud avatar
    16 posts
    Member since:
    Jul 2013

    Posted 30 Aug 2015 Link to this post

    hello 

    i need help for radrichtexteditor  , when make brows from my pc doc insert document when showing in radrichtexteditor

    he cant same style ?

  14. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 31 Aug 2015 Link to this post

    Hello Mahmud,

    If you want to clear the data you can just create new document:
    void button_Click1(object sender, EventArgs e)
    {
        this.radRichTextEditor1.Document = new RadDocument();
    }

    The following snippet shows how you can set the page size:
    this.radRichTextEditor1.Document.LayoutMode = DocumentLayoutMode.Paged;
    //custom size
    this.radRichTextEditor1.Document.SectionDefaultPageSize = new Size(800, 1000);
    //A4
    this.radRichTextEditor1.ChangeSectionPageSize(PaperTypeConverter.ToSize(PaperTypes.A4));

    In addition, I do not understand the question from your last post. Could you, please describe this case in details?

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready