I have a Zebra label printer on an XP box which I want to drive with JS in a FireFox browser. Currently I have a plugin based on the npscriptable geko sdk sample. I pass strings in using JS string property sets, and the plugin renders the strings:
<form>
<input type="button" value=" Print Label " onclick="doPrint();return false;" />
<input type="button" value=" Render Label " onclick="doRender();return false;" />
</form>
<div id="label_display" style="height:130px; width:392px;">
<embed type="application/scriptable-plugin" width=392 height=130>
</div>
<script>
var embed = document.embeds[0];
function doRender()
{
embed.caseNumber = "Case #2008-0001";
embed.renderLabel();
}
function doPrint()
{
embed.printLabel();
}
</script>
This works, but I would like to move the rendering out of the plugin since I'm the only windows programmer and others may want to change the layout. The problem is I'm not sure what the best way to go about this is. I thought about rendering on the server in php but I don't know how to pass the resulting image to the plugin. It seems like I might be able to to access a browser object somehow but I haven't found an example of how this would be done, and I'm not sure if I could pass the image data.
Thanks in advance, -Reed