This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing the resultset properly

 
B. Gregory
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have a resultset that I need to output in an HTML table for viewing. Then, I need to enable the page to be printable. I'm having some difficulty with page breaks and line overrun. Please enlighten me of any techniques to provide a nice output document.

Barry
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!
Unfortunately, HTML is not a very good way to manage page breaks and other such formatting options. How it is rendered is dependant primarily on the client, and you have no control over that.
(Example: A user has IE set to display and print Very Large text. Your formatting for Medium size text will not suffice).
If you need formatted pages, you could use a java-PDF library such as iText and serve up the .pdf instead of an HTML page. This may not meet your needs, but, then again, it may.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic