Screenshot Add-Ons: Listeners don't get called.

Hello,

I’m currently making an application in which the Users can print a dynamically generated Report. I already did this by filling a new Window with Vaadin UI Components and then executing Javascript “execute”

Now our users sometimes don’t want to print the page but want to have it available to download as a PDF file. The easiest approach would be to make a screenshot of the page we already build and then use the ByteArrayOutputStream to make a downloadable file. That’s why i tried the ScreenShot Add-On and the JS ScreenShot Add-On. I always did it pretty much the same way: First make the variable like: ScreenShot screenshot = new ScreenShot() then adding a listener screenshot.addListener(new ScreenShot.ScreenShotListener…) then adding the ScreenShot object to the Layout/Window window.addComponent(screenshot) and then calling screenshot.takeScreen…/makeScreen… sometimes in a Button.ClickListener and sometimes right after the addComponent line.

The ClickListener always got called but the ScreenShotListener never did.

Am i doing something wrong?

Cheers,
M.R.

PS: I’m not getting any errors in the code and the online demos in the vaadin directory for the Screenshot addon also don’t work for me (The application loads but the Button doesn’t do anything).