Display PDF in view


I’d like to know if it is possible to display the PDF file within a view instead of a table? The user can see automatically the pdf and export it if he need it.

Thx a lot.

If the PDF is dynamic (or it is stored on your local system), then you should access it with a FileResource:

File pdfFile;
//fetch file or write content to the file here 
Embedded pdf = new Embedded(null, new FileResource(pdfFile, getApplication()));

If the PDF is stored elsewhere and you have the URL you can use ExternalResource instead.

I think you can

build pdf viewers

by yourself with the help of some manual tools which can be customized by users according to our own favors. You can also google it and select one whose way of processing is simple and fast to help you with the related work. Remember to check its free trial package first if possible. I hope you success. Good luck.

Best regards,