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

Unsupported File format

10 Answers 240 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Rieni De Rijke
Top achievements
Rank 1
Rieni De Rijke asked on 17 Mar 2011, 03:32 PM
Thank you for the new RadRichTextBox.
I installed the new Q1 for 2011 and tried the Telerik Editor example.
Works fine, but... when I try to open or save documents as .docx (or as richtextformat) I get a messagebox: "Unsupported File format".

Office 2010 (Norwegian) is installed.

10 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 18 Mar 2011, 06:20 PM
Hello Rieni De Rijke,

Could you please check if you have added a reference to the following assembly: 
Telerik.Windows.Documents.FormatProviders.OpenXml

For easier extensibility and separation of concerns, RadRichTextBox uses format providers to deal with the import and export of the documents. Here is a list of the currently available format providers and the assemblies they are included in:

  • TxtFormatProvider (plain text) – Telerik.Windows.Documents;
  • DocxFormatProvider - Telerik.Windows.Documents.FormatProviders.OpenXml;
  • HtmlFormatProvider - Telerik.Windows.Documents.FormatProviders.Html;
  • XamlFormatProvider - Telerik.Windows.Documents.FormatProviders.Xaml;
  • RtfFormatProvider - Telerik.Windows.Documents.FormatProviders.Rtf;
  • PdfFormatProvider - Telerik.Windows.Documents.FormatProviders.Pdf.
Note that comments are currently not imported and exported with RTF, but they will be available in the service pack (due in midApril) or in an internal build some time before that.
If you have other questions, do not hesitate to contact us again.

All the best,
Iva
the Telerik team
0
Frank Wanicka
Top achievements
Rank 1
answered on 18 Mar 2011, 08:17 PM
I have the same issue. Also, please note that he and I are trying to run your sample app. So, the question is whether you included references to those DLLs, not us.
0
Rieni De Rijke
Top achievements
Rank 1
answered on 21 Mar 2011, 10:53 PM
You asked if I had added a reference to the following assembly: 
Telerik.Windows.Documents.FormatProviders.OpenXml

I'have added nothing at all. I only tried to run the sample app which is included in the new Q1 2011.
I checked which references are included.
Look here, these references are added to the project:

  • TxtFormatProvider (plain text) – Telerik.Windows.Documents;
  • DocxFormatProvider - Telerik.Windows.Documents.FormatProviders.OpenXml;
  • HtmlFormatProvider - Telerik.Windows.Documents.FormatProviders.Html;
  • XamlFormatProvider - Telerik.Windows.Documents.FormatProviders.Xaml;
  • RtfFormatProvider - Telerik.Windows.Documents.FormatProviders.Rtf;
  • PdfFormatProvider - Telerik.Windows.Documents.FormatProviders.Pdf.
0
Accepted
Boby
Telerik team
answered on 22 Mar 2011, 10:54 AM
Hi Rieni and Frank,

You are right, there is a issue with some assemblies missing in QSF Examples solution. As a simple workaround you could copy 
  • Telerik.Windows.Documents.FormatProviders.OpenXml.dll
  • Telerik.Windows.Documents.FormatProviders.Rtf.dll
from <install_folder>/Binaries/WPF to <install_folder>/Demos/Examples.WPF.

Thank for your cooperation and sorry for the inconvenience.

Greetings,
Boby
the Telerik team
0
Ralph
Top achievements
Rank 1
answered on 24 Mar 2011, 08:32 AM
Hi Boby,
I am creating my own application, I have copied the code from RTF page example, and added all the required references. But still I can only save in 'txt' format, and all other formats are popping an  "Unsupported File format" messagebox.
(I have checked if the dlls (Telerik.Windows.Documents.FormatProviders. *****.dll) are being copied to my output folder, and they all exist there). Am I missing something?
thank you,

Ralph Bou Raad.
0
Ivailo Karamanolev
Telerik team
answered on 28 Mar 2011, 09:35 AM
Hello Rieni De Rijke,

All format providers are loaded by MEF. If you see anything specific that can interfere with it, it's probably the cause. If you can't solve the problem, please get back to us with a demo project so we can further investigate the issue.

All the best,
Ivailo
the Telerik team
0
TOM
Top achievements
Rank 1
answered on 06 Jun 2011, 03:33 PM
In our application we are loading the appropriate assemblies in a separate package.  This allows us to shrink the payload of the rest of the application.  For all of the other telerik controls we are using, this works fine.  But with some of the Richtext and RibbonUI dlls needing MEF to load, we are not able to keep those dlls segregated.  Is there some reason this is done this way.  We would much prefer if the control could verify that the dlls have been loaded before attempting to load them up again.
0
Alex
Telerik team
answered on 09 Jun 2011, 05:02 PM
Hi TOM,

By default when trying to resolve its parts MEF is looking in the assemblies present in the directory when the application is running. Currently you cannot change this behavior. However for the next release in a few weeks we will be providing more control over the way MEF is working.
If you would like, you can open a support ticket and elaborate a bit more on your scenario so we could help you further.

All the best,
Alex
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
Rieni De Rijke
Top achievements
Rank 1
answered on 21 Oct 2011, 10:06 PM
Did you find a solution for the "Unsupported Fileformat" - problem?
0
Boby
Telerik team
answered on 26 Oct 2011, 05:13 PM
Hello Rieni De Rijke,
We are not sure what exactly your problem is. All format providers are loaded by MEF, this may cause problems if the format providers' assemblies are not in the application directory. Could you please elaborate more on your scenario? Are you experiencing issues with QSF or with another application?

Regards,
Boby
the Telerik team

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

Tags
RichTextBox
Asked by
Rieni De Rijke
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Frank Wanicka
Top achievements
Rank 1
Rieni De Rijke
Top achievements
Rank 1
Boby
Telerik team
Ralph
Top achievements
Rank 1
Ivailo Karamanolev
Telerik team
TOM
Top achievements
Rank 1
Alex
Telerik team
Share this question
or