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

Export HTML with images

1 Answer 299 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rasmus
Top achievements
Rank 1
Rasmus asked on 13 Dec 2010, 05:10 PM
Hi,

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
    Settings.ContentType("text/html");             
    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?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 15 Dec 2010, 06:31 PM
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,
Peter
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Rasmus
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or