Jiunarayan
Jiunarayan

Reputation: 39

birt tool dynamic text with dynamic HTML having embedded image not showing in pdf

I am trying to display HTML content in PDF using eclipse Birt. Birt has Dynamic text(HTML format) pallets where we can display clob data. Here one of my HTML content is embedded image base64. While viewing in PDF the embeded html image is not displaying instead showing error msg "The resource content not found". Birt expert please comment - On how to show Clob data embeded image dynamic HTML !

Upvotes: 0

Views: 1269

Answers (1)

hvb
hvb

Reputation: 2668

This is not going to work out of the box. BIRT HTML content is only meant for text formatting. Neither images nor HTML tables are supported (well, HTML tables actually are working to a minimal extent).

The best solution I can think of is: Parse the HTML yourself and extract the images yourself. But be warned, that's going to be tricky!

You would create two scripted DataSets, one for the text and one for the images.

Both DataSets would receive the HTML as input parameter. The first one would just replace embedded images with a text like "see image #N" and return exactly one row. The second one would extract the embedded images and return the image number, its URL and embedded data. You could then use a List item in the layout to render the images after the text.

The script code will be complicated...

Upvotes: 0

Related Questions