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

RadFixedDocument-Block-Image from database.

1 Answer 331 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
jaipal
Top achievements
Rank 1
jaipal asked on 03 Jan 2019, 09:51 PM

Hi All,

 

I need to write custom code for generating the PDF,  where i am getting the image in binary format some thing like below. from database. 

<img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATYAAACxCAYAAABOfp...........................

 

The Image needs to be inserted into BLOCK of RadFixedDocument. I do have the functions like the following , but my question is how to convert the above image format to any one of the parameters below.

block.InsertImage(imageSource);
block.InsertImage(stream);
block.InsertImage(imageSource, size);
block.InsertImage(stream, size);
block.InsertImage(imageSource, width, height);
block.InsertImage(stream, width, height);

 

Regards,

JP.

 

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 08 Jan 2019, 03:25 PM
Hi JP,

To convert the data to a stream, you can take a look at this StackOverflow article. After that, you can use the constructor which accepts a Stream object. Also, you can take a look at our ImageSource article for a reference.


Regards,
Martin
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
jaipal
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or