Embedding aN EPS Image Using the PopChart Embedder

EPS images cannot be embedded into a web page—they can only be downloaded and viewed with an external viewer. One common practice is to run a batch process to generate an EPS image at regular intervals, and then provide a link to it for users to download.

You can generate an EPS PopChart image by setting the PopChart Embedder imageType attribute to "EPS". For example, assuming your PopChart Embedder object is named myPopChart, you should use the following command to set the image format to EPS:

myPopChart.imageType = "EPS";

For the afore-mentioned reasons, most people don't embed EPS documents within web pages. Instead, they create EPS PopChart images that can be downloaded by themselves or can be embedded into other EPS documents. If this is your intent, you will probably be interested in the getImageData() method, which allows you to access a byte array of the EPS image and even return a EPS image directly from a Java Servlet.

Another alternative is to save an EPS image for future viewing using either the saveImageToAppServer(String, String) or saveImageToPopChartServer(String) PopChart Embedder methods. For example, you could run a batch process to generate an EPS image at regular intervals, and then provide a link to it for users to download. If you save the EPS image to PopChart Server, you could load the image in a different session with the loadServerSideImage(String)method.

Many users use PopChart Server as a library to create EPS images for non-web applications. To learn how to create a PopChart image using PopChart Server as a library, contact the Corda Technologies support team (support@corda.com).