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

converting html to pdf

 
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have an assignment to convert html to pdf. The html file may contain images, heading, text, tables etc. The output pdf file should look like the original pdf.

I have googled and found out some links. While i am investigating those links, can some one suggest what would be good APIs that would help me to do this conversion.

Any help will be appreciated.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
If it's CSS-styled XHTML, then the FlyingSaucer library can do this.

You could also try OpenOffice's Java API (I think OO can open HTML files), or a library like JODCOnverter that uses OO in server mode.
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi Ulf,
Thanks for your quick responses. I have been able to generate PFDs from HTML using FlyingSaucer. The PDFs generate are pretty neat.
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi Ulf,
I am trying to do pdf generation from html, but only first page of pdf is generated. The entire html is not converted to pdf. Let me know what should be done to rectify the problem. I spent time looking at the code but cannot find any clue.

HTML



CSS



 
Don't listen to Steve. Just read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic