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

HTML Export Settings

1 Answer 102 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bernhard
Top achievements
Rank 1
Bernhard asked on 04 Oct 2013, 05:08 PM
Hello,

I'm using the HTML export functionality for displaying the result in Microsoft SSRS reports as html.
I think I've considered all recommendations concerning the export:

var exportSettings = new HtmlExportSettings();
exportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
exportSettings.StylesExportMode = StylesExportMode.Inline;
exportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles;
exportSettings.ExportFontStylesAsTags = true;
exportSettings.ImageExportMode = ImageExportMode.None;
exportSettings.ExportStyleMetadata = false;
 
 
var formatProvider = new HtmlFormatProvider();
formatProvider.ExportSettings = exportSettings;
 
string result = formatProvider.Export(this.radRichTextBox.Document);

The SSRS html renderer displays the data correctly, but not when exported as PDF. There somehow the font type get lost.
I've found a post about this MS problem here: textbox-content-rendered-as-html-does-not-respect-fontfamilywingdings-2
--> So what I'm trying to achieve is instead of...
<span style="font-family:'wingdings 2';font-size:24px;">abc</span>
with style attribute I want to get an output like this:
<font face='wingdings 2' size='24'>abc</font>

Is there a way to do this?

Best regards & thx,
Bernhard


-------------------------
UPDATE:

It does work with SSRS 2012 - you just have to remove the single qutoation mark, so instead of the example above just:
<span style="font-family:wingdings 2;font-size:24px;">abc</span>

@Telerik:
I'm still curious if we can export html data as described above ;-)

1 Answer, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 09 Oct 2013, 03:51 PM
Hi Bernhard,

RadRichTextBox's HTML support is somewhat limited due to the fact that there is not always a good parallel between RadDocument's model and the HTML document model. While we try to provide support for as many options as possible on import, exporting a document will always map the DocumentElements to their respective analogue in the HTML format. That said all Span document elements are exported as span tags and you cannot force them to become font elements. 

Let us know if you have any other questions.

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
Tags
RichTextBox
Asked by
Bernhard
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or