Teleriks Radrichtextbox word

2 posts, 0 answers
  1. Gauri
    Gauri avatar
    1 posts
    Member since:
    Jan 2014

    Posted 21 Jan 2014 Link to this post

    We are using your trial version .Now we face some problems for radrichtextbox
    1. We save document by following code
       public void ExportContent(string defaultExtension, string filter,IDocumentFormatProvider formatProvider)
                var saveFileDialog = new SaveFileDialog
                    DefaultExt = defaultExtension,
                    Filter = filter
                saveFileDialog.FileName = wordfilepath;
                    using (var outputStream = saveFileDialog.OpenFile())
                        formatProvider.Export(radRichTextBox1.Document, outputStream);
    2 . Now when we insert picture using teleriks insert picture method .Picture is inserted and file is saved by above method.Then on another form we cannot display this image on richtextbox .So I added code to picture command as follows
    string fieldName = ((RadRibbonButton)e.Source).Text;

                if (fieldName.ToUpper() == "PICTURE")
                    MergeField mf = new MergeField();
                    mf.PropertyPath = fieldName;
                    IncludePictureField picField = new IncludePictureField();
                    picField.SetPropertyValue(IncludePictureField.ImageUriProperty, mf);
                    radRichTextBox1.InsertField(new MergeField() { PropertyPath = fieldName });
    this insert image and also label PICTURE as merged field but on form where this rtf file displayed in richtextbox it shows "Cannot display image"
    3. Please tell us teleriks proper method to insert image and display on richtextbox (Field merge method).We are new teleriks method.
    4. Also When we create Header and footer in Teleriks editor and save file in rtf. When this rtf file loaded again it doesn't shows header and footer .Please tell me reason behind this.

  2. Yancho
    Yancho avatar
    72 posts

    Posted 23 Jan 2014 Link to this post

    Hi Gauri,

    Thank you for your interest in Telerik RadRichTextBox.

    The method you are using to insert IncludePictureFields in a document is the suggested one and should be working without any issues. We tested similar setups, but were unable to replicate the issue you are observing. Same applies for the issue mentioned in 4. - headers and footers seem to be serialized properly to RTF.

    Please find attached the sample project we used to troubleshoot this. The version I used was the latest official release - 2013 Q3 S1. Could you please try the project and share with us the version of RadControsl you are using?

    We are looking forward to your reply.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top