• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I want to create PDF file from HTML file

 
Ranch Hand
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to create a pdf file using java API. If you have any solution please tell me.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most commonly used library is iText, which is very powerful. Although its web site has many extensive examples that are sufficient to learn how to create a wide range of PDFs, you will want to read "iText in Action" if you're serious about using it.

If the data that goes into the PDF is in XML, and you're comfortable about using XSL, then the Apache FOP library takes a different approach to creating PDFs.
 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
even you can use apache's poi also for PDF generation .
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Apache POI does not have any provisions for creating PDFs.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[ UD: Please do not post unrelated questions into existing posts. That's called "hijacking" and is frowned upon. Instead, start a new thread. ]
 
Pankaj Upadhyay
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Deleting my post..don't want to offend anyone..

Thanks,
Pankaj
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pankaj Upadhyay wrote:I am totally fine with deleting my post but instead of that you could have created a new post. I dont have any back up of that post which I had written and again I need to write from scratch.


I sent the text of the post as PM to you prior to deleting it. Check the "My Private Messages" link at the top of the page.

And this was not hijacking, this was reusing some already running post so that there should not be lot of similar threads running concurrently.


It was hijacking, since the topic of your question was about using FOP specifically, which the original topic never got into.

you have just s*****d me


Please remember that the cardinal rule here on JavaRanch is Be Nice.

And now, if you want to discuss hijacking or post deletion any further, please start a new topic in the "Ranch Office" forum; that's the proper place to talk about site-related topics. I can copy the relevant parts of this discussion there if you like.
 
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic