Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Embedded Image not visible when report is emailed
jmuthuku
Hi,<br />
I have created a report with embedded images and when I run the report from eclipse and view it as HTML in my browser I can see the images. But when I programatically generated the report and send it out as an email I don't see the images. <br />
Viewing in the page source of the email I see the following corresponding to the image:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><img id="AUTOGENBOOKMARK_13_e8af9b1e-6ae0-416f-b79e-5111bf175caf" src="file:/tmp/design105.png" alt="" style=" width: 0.333in; height: 0.333in;display: block;"></img></pre>
<br />
The question is, eventhough I have embedded the image directly in the report (the rptdesign file) why is it trying to look for it in the /tmp directory. I'd appreciate if someone could provide some pointers. Thanks.<br />
<br />
- Jay<br />
<br />
btw, I am trying to avoid sourcing the images from a server.
Find more posts tagged with
Comments
JasonW
The only way I know to handle images not from the server is to use either a pdf, or create your own ImageHandler eg extends HTMLImageHandler or try using the base64 inline image <img src=data:image... tag in a text element. Have a look at the attached exmaple for an inline image example. Specifically look at the beforeFactory script. I have not tried the HTMLImageHandler but it seems to me this method could work as well. For reference you can look at the HTMLCompleteImageHandler and the HTMLServerImageHandler examples from the source code. Essentially these classes just return the url of the image.
Jason
jmuthuku
Thanks. That worked.
- J