HTML Export Settings

2 posts, 1 answers
  1. Bernhard
    Bernhard avatar
    22 posts
    Member since:
    Jul 2013

    Posted 04 Oct 2013 Link to this post

    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 ;-)
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 09 Oct 2013 Link to this post

    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 >>
  3. DevCraft banner
Back to Top