I’ve been snowed under with other work but I’ve now been able to look at this again and have some more info on how this can be achieved.
All we need to do now is emulate the canvas context object as a Java object that creates images – I’m tracking down a library as we speak. This means that the following should work;
a) Design a rich HTML page with PD4ML tags within it and Canvas graphics
b) Create a Rhino instance and add to it the envjs and a Canvas context emulator
c) Run the HTML page through Rhino using an HTML parser and capture the resulting cavas images localy
d) Run the HTML through PD4ML using the new canvas hook which returns the appropriate image from step c)
Sounds like a lot, but actually I think this is pretty straightforward from a servlet point of view
Anyone done this yet?