Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Creating pdf in vaadin
Hi...
Suggest a way to create pdf of the page contents in vaadin.
There is no standard way to do this. A while back there was a discussion that led Marko to create the Screendump add-on. The idea would be to read the HTML back, and give it to a tool like wkhtmltopdf.
The missing steps are to read the HTML and remove what is not needed (the on-line demo shows an example the HTML produced), and to create a style sheet suitable for paper-sized output.
Is it possible with java iText library. ??
See for example http://jcraane.blogspot.com/2010/09/printing-in-vaadin.html
I understood your question as "Can I create a printable version of my Vaadin page without rewriting code". If you use iText to create your content you have to program the printable version separately.
For anyone else who searches this up, another great example which uses a PDF form approach (much easier than building an entire PDF through itext's api imo) can be found here http://www.codeproject.com/Articles/208179/PDF-Generation-Using-Templates-and-OpenOffice-and
Hi there
That exactly what i want to know.I have tried create pdf files using this code in vaadin:
/// <summary> /// create an empty PDF Document /// </summary> /// <param name="pageCount"></param> /// <returns></returns> public PDFDocument CreatePDFDocument(int pageCount) { return new PDFDocument(pageCount);
But it display nothing.I want to know that if there is a powerful pdf processing program which supports to work with vaadin directly.That would be more convenient for me.Thanks for any suggestions.