How to view a PDF in Vaadin 7 directly?

It looks like that the sample code for view the PDF in the book-of-vaadin doesn’t work now. Could someone give some tips on how to view the PDF in vaadin 7?

I had the same problem, heres the thread for the solution: https://vaadin.com/forum#!/thread/7717382

Thank you so much!

Could someone give more comments on how to use the dynamic PDF source instead of static file?

Hi,

Try iText library. There are some alternatives as well with more liberal license, but iText is provent to work well.

cheers
matti

Yes. I already tried this great library.

But I am newbie about the Vaadin and I have no idea about how to integrate it with Vaadin 7. I just know there is a good sample of Vaadin 6.x.

Thanks

Pretty much the same as in Vaadin 6. There are some helpers thought that might help to overcome some popup blocker issues with browsers. Check out this page:

https://vaadin.com/wiki/-/wiki/Main/Letting+the+user+download+a+file

cheers,
matti

Another question: The iText library could only be used on the server side. How to make these APIs work in the UI classes?

Thanks in advance.

Very easily. Those UI classes, or their instaces to be more exact, are living in you servers JVM aka on the server side. So just like with any other std Java app.

In Vaadin, there is only this “thinclient” that gets compiled with GWT to javascript and is working on client side.

cheers,
matti