Export HTML with images

2 posts, 0 answers
  1. Rasmus
    Rasmus avatar
    18 posts
    Member since:
    Oct 2008

    Posted 13 Dec 2010 Link to this post


    I would like to export my reports as HTML with the inline images instead of the links with StreamID currently created by exporting to HTML.

    I have set the Value of my picture box to:

    this.pictureBox1.Value = "http://image.url/image.jpg";

    I currently use the following code to export to HTML:

    private Stream GetHtml(IReportDocument report)
        //Calls WebOperationContext.Current.OutgoingResponse.ContentType
        var reportProcessor = new ReportProcessor(); 
        var result = reportProcessor.RenderReport("HTML", report, null);
        return new MemoryStream(result.DocumentBytes);

    this renders images like this:

    <img src="&StreamID=i1f3amm2v1v"/>

    However I would like it to render the images like this:

    or maybe like this (using data urls):

    <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD..."/>

    Are there any way to configure the export to include the images?
  2. Peter
    Peter avatar
    1631 posts

    Posted 15 Dec 2010 Link to this post

    Hi Rasmus,

    In order to have inline images our suggestion is to export your reports to Web Archive i.e. MHTML Rendering Extension

    Kind regards,
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
Back to Top