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




29 comments :

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

    ReplyDelete
  2. 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
  3. Also, weblog frequently and with interesting material to keep individuals interested in coming back and checking for updates. website designer nyc

    ReplyDelete
  4. 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
  5. This comment has been removed by the author.

    ReplyDelete
  6. 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
  7. 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
  8. 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
  9. 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
  10. Merely wanna admit that this is very beneficial , Thanks for taking your time to write this. facebook marketing

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

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

    ReplyDelete
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. Ideally, lead generation is not a new thing in online marketing. In fact, it has been there for a long time. It is a perfect way of generating the interest of your potential customers. outsourced lead generation

    ReplyDelete
  19. Thus, webmasters must investigate the pros and cons of SEO services. The major tasks of the SEO experts. Lead generation

    ReplyDelete
  20. One of the more common problems with Internet marketers is that they do not know how to use their money wisely. Let's say you have earned a cool thousand dollars in sales from your most successful marketing campaign. Leads

    ReplyDelete
  21. Through the site has existed for more than a year, marketing staff and senior management will naturally question its effectiveness. Offertes aanvragen

    ReplyDelete
  22. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. html mailto

    ReplyDelete
  23. Mock4solution provide the best pdf dumps to pass any certifications exam. All exams pdf questions are 100% real and updated.Mock4solutions

    ReplyDelete
  24. I know your expertise on this. I must say we should have an online discussion on this. Writing only comments will close the discussion straight away! And will restrict the benefits from this information. Next Gen Store

    ReplyDelete
  25. 100% Pass Guarantee is offered by us after Citrix Virtual Apps and Desktops 7 Assessment. Design and Advanced Configurations Exam 1Y0-403 exam preparation, with Prepare4Test’s exam dumps. You can pass the 1Y0-403 exam in the first go with good marks, and it will be easy for you to attempt all 1Y0-403 questions.

    ReplyDelete
  26. The more the quantity of picture designs upheld by your PDF converter the better it will be in dealing with your various requirements when they emerge. https://pdf-png.com

    ReplyDelete

Recent Posts

Recent Posts Widget

Popular Posts