Cannot take full-page screenshots of Vaadin applications?

Hello,

I use the following tools to help take “full page” screenshots of applications, but strangely they don’t seem to work on Vaadin applications.

The test page is simple, just create a long page that extends more than one screen, like this:

for (int i = 0; i<200; i++) {
   Label label = new Label("This is label number #"+i);
   this.addComponent(label);
}

Tested on Firefox 3.6.8 and Vaadin 6.4.1.
The screenshots will always show only what’s visible on-screen, not the full page. I first thought that it’s a bug in the tools, but then i tried the vaadin directory at http://vaadin.com/directory (which i believe is written in vaadin), and it works, so i must have missed something in my code…

Any pointers?
Thank you very much in advance.

If you are using Mac, try tool called “Paparazzi!”. It seems to be able to take pixel perfect screenshots of Vaadin applications.

The problem you might have is the size of the window. If you use “undefined” height in an application (like Directory), it probably behaves well with screenshot tools. If you are using “100%” height, you screenshot tool might provide a really small height. In Pararazzi one can give the min/max height for the web page.

Thank you for the answer; unfortunately i don’t currently have access to a mac.

I tried adding a setSizeUndefined() or setHeight(“”) call:

        this.setHeight("");
        for (int i = 0; i<200; i++) {
            Label label = new Label("This is label number #"+i);
            this.addComponent(label);
        }

but it doesn’t seem to be working.

Regards,
ts.

PS: Added sample screenshots taken with “screengrab!”, one of the Vaadin Directory (works perfectly), the other one was of the sample app (only shows 1 screen area, with scrollbars).
11392.png
11393.png

Did you add setSizeUndefined() both to window and layout inside the window?

Yes, i did.

This is the code i tested it with.

public MainWindow() {
        //
        super();
        //
        this.setSizeUndefined();
        for (int i = 0; i<200; i++) {
            Label label = new Label("This is label number #"+i);
            label.setSizeUndefined();
            this.addComponent(label);
        }
        this.getContent().setSizeUndefined();
    }

regards,
ts.