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




18 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
  10. Hip dysplasia is not uncommon in many dog breeds, particularly the larger breeds. It is a deformity of the of the hip joint so the bone and socket do not fit snug. It causes rubbing and degeneration of the bone, inflamation and damage to surounding cartalidge. The condition usually leads to arthritus as the bone is grinded down new mishapen bone grows back causing pain. The good news about Canine Hip Dysplasia is that most cases can be treated to help eliminate or decrease pain, allowing fairly normal levels of activity. Very few dogs today have to be put to sleep to alleviate suffering. There are always choices to be made, but the vast majority of affected animals can live quite comfortable lives. Depending on how severe the damege is pain medication and anti-inflammatory drugs can be given. Another very good supplement to give is glueclosamine. Eventually though surgery might be necessary. . . I would suggest talking to the shelter about having him examined by a vet of your choice before officially adopting him. If you are willing to spend a little money to consult with a vetranarian you’ll be able to discuss this guy’s prognosis. This way you can know beforehand if his case is mild or severe and what treatment options are reccommended and at what cost. I hope I haven’t scared you away from adopting this dog because it may only be arthritis misdiagnosed or a mild case of hip dysplasia, only a vet can tell you for sure. web design agency los angeles

    ReplyDelete
  11. Merely wanna admit that this is very beneficial , Thanks for taking your time to write this. facebook marketing

    ReplyDelete
  12. healthier hair is of course mainly due to genetics but food supplementation can also help you get it** website design la

    ReplyDelete
  13. Good day, i am doing research right now and your blog really helped me.    web design agencies los angeles

    ReplyDelete
  14. just couldn’t leave your web site before suggesting that I really loved the standard information a person provide for your visitors? Is gonna be again ceaselessly to check up on new posts website design agency

    ReplyDelete
  15. I’d must verify with you here. Which isn’t something I often do! I enjoy studying a publish that can make people think. Also, thanks for permitting me to remark! website design company

    ReplyDelete
  16. An interesting dialogue is value comment. I believe that it is best to write more on this matter, it may not be a taboo subject but typically persons are not enough to speak on such topics. To the next. Cheers web design agency

    ReplyDelete
  17. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. cfa level 1 mock exam pdf

    ReplyDelete
  18. I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! cfa level 1 material

    ReplyDelete

Recent Posts

Recent Posts Widget

Popular Posts