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

Export to HTML - Fail

1 Answer 50 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 30 Aug 2011, 05:09 PM

I am just doing a proof of concept and have run into a wall.

Why can't I export the contents of the RADRichTextBox control using this code:

 

 

Dim provider As New HtmlFormatProvider() 
Dim HTML As String = provider.Export(RadRichTextBox.Document) 

 

 

I get the following error, which makes no sense since there are no images in the sample text in the Document (it's just a "hello world" message):

Could not load type 'Telerik.Windows.Documents.Imaging.PngEncoder' from assembly 'Telerik.Windows.Documents, Version=2011.2.712.1040, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'.

Oh, and BTW, your RichTextBox VB code examples in the Online Help don't work either.

 

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 02 Sep 2011, 02:06 PM
Hello Dave,

Could you please verify that all assembly references in your project are of the same version? The assemblies implementing the format providers have a dependency on the Documents assembly, so they have to be of the same version. Judging from the exception you have reported, it seems that the version of the format provider is an older one than that of Telerik.Windows.Documents.
If upgrading all assemblies to the latest version does not help, we would greatly appreciate a sample project illustrating the issue. A list of the needed dlls can be found here.

Kind regards,
Iva
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

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