Creating pdf in vaadin

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
add-on. The idea would be to read the HTML back, and give it to a tool like

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

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

Hi there
That exactly what i want to know.I have tried create pdf files using this code in vaadin:



create an empty PDF

Document ///
/// /// 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.