Tuesday, September 24, 2013

Liferay PDF generation from HTML using flying saucer

Liferay PDF generation from HTML using flying saucer

Objective:

Generate PDF content in liferay using html content. Generally we use itext library to generate pfd. When we use itext library we need to write so much java code to prepare PDF. I have done example which generate PDF by using html.
I am using one of library called flying saucer from this we can convert xhtm or html content as PDF.
We can also apply CSS to html so that same view we can get in PDF. For more details you can follow the link.

Download porlet from following link


In download link I am providing .war and source code.
If you want use .war file simply download war file and place into your liferay portal deploy directory then it will be deployed and portlet is available in sample category and portlet name is Pdf Action.
I have done simple example so that you can get idea to generate PDF using html.
I just hard code some HTML table in action class I am passing html content to flying saucer it will convert the html to PDF.
You can go through the code you will get more info.
I have used liferay 6.1 CE.
Note:
If you are using lower version you just copy portlet class code and jar files to you existed portlet. Otherwise portlet won’t be deployed.

If you get any problem in download file is not able to view or no data in download file please refer this following link

https://www.liferay.com/community/forums/-/message_boards/message/31500678




9 comments :

  1. Hi there is some problem with you plugin.please refer this thread
    https://www.liferay.com/community/forums/-/message_boards/message/31500678

    ReplyDelete
  2. Thanks for the info. And a response from you. car dealers hips san jose web design manhattan

    ReplyDelete
  3. Hi. Thank you for making this site . I m working on betting online niche and have found this site using search on bing . Will be sure to look more of your content . Gracias , see ya. :S web design new york

    ReplyDelete
  4. Also, weblog frequently and with interesting material to keep individuals interested in coming back and checking for updates. website designer nyc

    ReplyDelete
  5. I do believe all the ideas you have presented for your post. They’re very convincing and can definitely work. Still, the posts are very quick for novices. Could you please lengthen them a little from next time? Thank you for the post. web design in new york

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. There will be several totally different portions about the LA Weight reduction eating plan and one is really important. Begin stage is your actually truly of these extra load. weight loss brand identity design agency

    ReplyDelete
  8. Psychological focal point, training, likability, aspect, calm yet rely on. However these are some of the items Tang Soo Use, your current Mandarin chinese style created by self defense, can show we and additionally instilling in your soul the power not only to fight you and your family about the craft the very first hazards signs in conflict altogether. branding agencies in san francisco

    ReplyDelete
  9. That’s why you have to have effective web based business home keep when it comes to taking items right your individual web-based online business. cash ux designer san francisco

    ReplyDelete

Recent Posts

Recent Posts Widget

Popular Posts