I’ve build my first gwt app and there is only one more thing I need to support – printing. I have a TabLayoutPanel and basically I want to print two CellList, one FlowLayoutPanel and a couple of Labels.
I found this open source project:
http://code.google.com/p/gwt-print-it/
What I tried was to create a separate FlowLayoutPanel (not shown on the screen) and add all the widgets to it one by one and call Print.it(…) on that widget. That didn’t work. Then I’ve tried printing a single label just to make something work but no luck. I’m allways getting
Error: Can’t find printing frame.
Now I’m looking at SO and seeing that this kind of printing is working for some folks. Am I doing something wrong? I will appreciate any ideas, though or comments.
According to Print.java, referenced from the HowTo project wiki page, you have to insert the following iframe into your page: