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

HTML Binary Image in HTML Textbox

3 Answers 665 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
hamza
Top achievements
Rank 1
hamza asked on 02 Apr 2016, 03:31 PM

I am setting the value of Html Textbox like below :

<img src="data:image/png;base64........" />

but the telerik report is showing blank white page instead of the image.

Is telerik report interprets image tag? or we can achieve that.

 

thanks.

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 04 Apr 2016, 02:38 PM
Hi Hamza,

The HtmlTextBox item supports only certain text formatting option listed here.

If you want to display image, you can use the PictureBox item, where the base64 string will have to be converted to an Image object in code. For the purpose you can use a custom function to set the PictureBox.Value property which functi8on will be evaluated on processing the report and displaying it.


Let us know if you have any further questions.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
James
Top achievements
Rank 2
answered on 18 Aug 2020, 09:13 AM
Stef, could you not provide an example? 

I've been struggling with the same issue. Where the PictureBox control in the Telerik Report Designer program, plainly wont accept the Base64 image. Fine, we then convert it to Binary Data, but then the picture box shows a blank image. 

Is there no EXAMPLE anywhere?? 
0
Neli
Telerik team
answered on 21 Aug 2020, 06:29 AM

Hi James,

Since R2 2020, we added the option to display a Base64 image in a PictureBox out-of-the-box. If upgrading is not possible for you, you can use the approach given in PictureBox Image as Base64.

Regards,
Neli
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
hamza
Top achievements
Rank 1
Answers by
Stef
Telerik team
James
Top achievements
Rank 2
Neli
Telerik team
Share this question
or