RE: Display PDF file content on liferay page load

Prashanthi Laxmi, modified 7 Years ago. New Member Posts: 2 Join Date: 10/9/17 Recent Posts

I want to display content of PDF file (located at a server path), when i hit a specific page url. I located the file and now got struck at rendering the file content to jsp (from rendermapping method). I know resource method will simplify the job but i need the functionality on the initial page render.  Any help/pointers are highly appreciated.

thumbnail
Samuel Kong, modified 7 Years ago. Liferay Legend Posts: 1902 Join Date: 3/10/08 Recent Posts
This is probably something you don't want to do on your own. Jump over to Google and search for a PDF to HTML library that works for you and use that library.
thumbnail
Minhchau Dang, modified 7 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
I need the functionality on the initial page render.  Any help/pointers are highly appreciated.

Have you considered creating an iframe that points to a service resource URL that serves the PDF?