Search code examples
gwtsmartgwt

SmartGWT Canvas getPrintHTML


We are facing problem with our widget which we want to conver to a PDF. The widget has some custom images and a custom hotspot widget to it. It works fine on the browser.

But when we call getPrintHTML, it is ignoring the images and printing everything else. The HTML for the widgets seems to contain DIV's with the images being styled as background images (instead of foreground images).

Questions:

  1. Does Canvas.getPrintHTML ignore background images?
  2. Is there a way to over-ride or work around this behaviour?

Solution

  • Take a look at the SmartGWT EE Javadoc.

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/Printing.html

    The print properties maybe ? http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/util/PrintProperties.html