Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Add images at run time to pdf using birt viewer
Jyothy
I have integrated web Viewer into my tomcat application.
I need to show images in pdf and these has to be added dynamically during run time.
I could do this to some of my other reports using Report Engine API.
I do not have any idea how can i do it with viewer.
Can i invoke any class file which has code to get the dynamic image and set it to reuqest object so that design fille renders it at runtime
Regards
Jyothy
Find more posts tagged with
Comments
JasonW
Are you wanting to put the image bytes in the request object or just a pointer to a created image? What did you do in the RE API?
Jason
Jyothy
In REAPI i have put image bytes in request.
With BIRT Viewer as i cannot use REAPI , how can i dynamically add image to pdf at runtime?
I get the image at run time based on certain parameters selected by user for rendering the report. I need to put these image bytes in request so that design file uses it for rendering in PDF.
Also how can I know the export type in rptdesign file with Viewer?
I need to know as i need to add hyperlinks only if its html.
Also, can u let me know how can i get request parameters in MyFilenameGenerator which implements IFilenameGenerator.
Thanks in advance
Jyothy Anjuri.
JasonW
On the image bytes, you should be able to add them to session using your own JSP Page (add it to the viewer) and retrieve them using the reportContext.
reportContext.getHttpServletRequest().getSession().getAttribute("imagesessionvar");
If you want to check the output format use reportContext.getOutputFormat(), keep in mind if you want this to work when using the /frameset mapping do the check in an on render. Take a look at the attached example that shows two elements, one is turned on for HTML and the other is turned off. When using pdf the order is reversed.
Jason