Hello
I dont know if you already solved the problem but I have come face to face with
somewhat same problem and I solved it like this:
I created a temporary file and I set the content of it with the html content that I want to print. then I got the URL of the file and set it to my browsers url. then
I used a small javascript code to print my browser's context. here is the source code that I used.
Browser browser = new Browser(c,SWT.NONE);
File temp = null;
try {
// Create temp file.
temp = File.createTempFile("pattern", ".suffix");
// Delete temp file when program exits.
temp.deleteOnExit();
// Write to temp file
BufferedWriter out = new BufferedWriter(new FileWriter(temp));
out.write(toPrint);
out.close();
} catch (IOException e) {
}
//get the uri and url and set the browsers URL
try {
browser.setUrl(temp.toURI().toURL().toString());
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
browser.execute("javascript

rint()");
}
if you have questions dont hesitate to ask...
deniz gul