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

How to Import And Export in DocxFormatProvider?

1 Answer 115 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
vahid
Top achievements
Rank 1
vahid asked on 20 Sep 2014, 12:05 PM
public byte[] GetMeDocumentByteArray()
        {
            if (DocViewer.Document != null)
            {
                IDocumentFormatProvider provider = new DocxFormatProvider();
                byte[] data = provider.Export(DocViewer.Document);
                return data;
            }
            else
                return null;
        }

        public void LoadDocument(RadRichTextBox rd, byte[] MyDocument)
        {

            if (MyDocument != null)
            {

                try
                {
                    IDocumentFormatProvider provider = new DocxFormatProvider();
                    RadDocument Doc = provider.Import(MyDocument);
                    rd.Document = Doc;
                    rd.UpdateLayout();
                }
                catch (Exception ex)
                {
                    PPDialogMessage message = new PPDialogMessage();
                }
            }
        }

I use this above code.But when Use Export Method,Not load Style And Format such as(Font,size,Color,...)!!!!!!!!
Please Help me
thank so Much

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 24 Sep 2014, 10:33 AM
Hi Vahid,

It's hard to say what might be causing this based on the provided information. We would appreciate it if you send us the original document, so that we can look into the cause of the behavior.

Regards,
Petya
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.
 
Tags
RichTextBox
Asked by
vahid
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or