Recently a customer contacted support because he wanted to render HTML charts on the fly in a Web app, but the output wasn’t rendering properly. If you find yourself in the same situation — when you have generated a report and you would like to access the images before they are written out to the output — here’s what you need to know.
The Quick Overview
When generating images while using HTML output in Windward, Windward creates an image of the rendered chart. You then have to insert this image into your final report output.
Windward does this by saving the image as a bitmap stream. This stream can then be accessed by your calling application in order to display the image of the rendered chart properly.
How the Process Works
First, your image will be stored in memory as an array. Typically, these images would be written out as image files, although the option also exists to write these images as Base64 strings embedded in the HTML code.
Before the output is written to a file, you can access the image byte array directly through Windward’s API.
The .NET Engine
The Java Engine
NOTE: In the Java Engine, this will return an OutputStream.
Sample Code, Sample Template and More
Author: Marcus Johnson
Other posts by Marcus Johnson