This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

HTML to PDF possible?

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have one big Application Form .Client wants it to convert that big jsp page into PDF.He wants to print only with PDF documents.

Is there any API to convert HTML to PDF.

Thanks,
LALITH
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iText is a free java-pdf library.
 
lalitha prasad
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank you for replying my question.In that site they mentioned like this.
"Can I convert a HTML file to a PDF document?
This is not really supported by iText."

If you know how to convert from HTML to PDf. please tell me.

Thanks,
LALITH
[ October 21, 2004: Message edited by: lalitha prasad ]
 
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not really a JSP issue so I'm moving this along to General Computing.
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we use a custom style sheet to transform html to xsl-fo which is then rendered through fop to get a pdf for printing.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lalith,

I think you will be having in hand the content which you would be displaying in the HTML page. Hence, what can be done is that instead of forwarding to a html page, you can generate a PDF document using iText, put the data in that PDF and then forward to that PDF. By using JSP, we can set the content-type to text/pdf, which will pick the PDF you have generated and display it in the browser window.

By going through this approach, you can keep your client happy by displaying the content in a browser, as well having it in a PDF format.
[ October 22, 2004: Message edited by: Hemanth Pallavajula ]
 
Wink, wink, nudge, nudge, say no more, it's a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!