Embedding an EPS Image in HTML

You can request that PopChart Server generate an image in the EPS format by using the @_EPS server command. For example, the following HTTP request will generate an EPS PopChart image:

http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_EPS

If you attempt to browse to an EPS image—for example, entering the location above in the location bar of your browser—you will most likely be prompted to enter a location on your computer to download the file. This is because you cannot view it in a browser. You will need to save it (be sure to give it a .eps extension) and then open it up in a suitable graphics program.

EPS images cannot be embedded into a web page. Instead, most people will provide a link to the EPS image, which can be viewed separately. Example 14.4 shows how you might link to an EPS image.

Example 14.4 Linking to an EPS Image

<a href="http://localhost:2001/?@_FILEexamples/apfiles/bar.pcxml@_EPS"> 

Click here to view the graph in EPS format 

</a>

When a viewer clicks on this link, the browser will download an EPS file containing your PopChart image.

If you want to be able to view an EPS PopChart image in any context other than as a downloaded file, you will need to set up your own proprietary system. If this is your intention, you will probably want to generate your image using the PopChart Embedder library method, as explained above.