RadDocument Image printing as HTML with Base64EncodedSplit Issue

2 posts, 0 answers
  1. Muhammad
    Muhammad avatar
    9 posts
    Member since:
    Nov 2013

    Posted 30 Aug 2016 Link to this post

    Dear Admin,

    we have a serious issue and needs urgent response we are paid user of telerik.we programmatically load image in RadRicTextbox then we print image this through Radrichtextbox control the solution works fine with IE11 but for IE8.0 some image are shown half. when we saw the generated HTML it seems that the images that are shown broken on browser pop up are not using Base64EncodedSplit as the HTML Have only one <img> tag. These images are also attached for reference. 

    RadDocument docu = new RadDocument();
                        docu.LayoutMode = DocumentLayoutMode.Flow;
                        Telerik.Windows.Documents.Model.Section section = new Telerik.Windows.Documents.Model.Section();
                        Telerik.Windows.Documents.Model.Paragraph p1 = new Telerik.Windows.Documents.Model.Paragraph();
                        ImageInline img1 = new ImageInline(stream1);
                        p1.TextAlignment = RadTextAlignment.Center;
                        this.richTextbox.Document = docu;

    private void btnPrint_Click(object sender, RoutedEventArgs e)
                    var obj = RadCompositionInitializer.Catalog;
                   HtmlExportSettings exp = new HtmlExportSettings();
                   exp.ImageExportMode = Telerik.Windows.Documents.FormatProviders.Html.ImageExportMode.Base64EncodedSplit;
                   exp.DocumentExportLevel = DocumentExportLevel.Fragment;
                   exp.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles;
                   exp.StylesExportMode = StylesExportMode.Inline;
                   exp.ExportFontStylesAsTags = true ;
                   RadCompositionInitializer.Catalog = new TypeCatalog(typeof(Telerik.Windows.Documents.FormatProviders.Html.HtmlFormatProvider));
                   PrintSettings settings = new PrintSettings()
                        HtmlPrintExportSettings = exp,
                        DocumentName = "My document",
                        PrintMode = Telerik.Windows.Documents.UI.PrintMode.HtmlPreview,
                        UseDefaultPrinter = true,
                        PrintScaling = Telerik.Windows.Documents.UI.PrintScaling.None
                    RadCompositionInitializer.Catalog = obj;
                catch (Exception ex)
  2. Mihail
    Mihail avatar
    261 posts

    Posted 01 Sep 2016 Link to this post

    Hello Usman,

    I am afraid that I couldn't manage to reproduce the issue. The generated HTML contains the image as multiple <img> tags with base64 encoded data.

    Could you please open a support ticket with attached a simple working demo project illustrating the described problem? Could you also provide information about the version of the assemblies you are using?

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top