• 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

Printing in JSP ???

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can we Print the content of a file using JSP ???
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't. The last thing the world needs is rogue websites which, when visited, cause large print jobs to be forced into your computer, using up your paper and ink/toner, and maybe even overloading and crashing the system. So it's not permitted.
However, you can output a web page and permit the user to print it. Or for situations where you wish exact control of the page layout, output content in PDF format.
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was browsing some of the old posts when i saw this and wanted to know more.
Can anyone give me more on how to really output in PDF format ?
resources even ?
TIA
------------------
KaReEm
 
Tim Holloway
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need software. PDF printing is a page-layout form - meaning that you don't just output text, you specify fonts and absolute page positions (as well as graphics and other things to make the document look nicer).
There are commercial packages for this, but a good way to get your feet wet is to get the gnujp package (formerly known as retepPDF) from http://www.sourceforge.net I recommend that you start by writing the code in a Java Application and capturing the output to a PDF file - that way you can debug the PDF part without getting into problems because Netscape won't display PDF's properly unless they're downloaded preceeded by a valid Content-Length header - and you won't know the PDF size until the PDF has actually been created!
 
Kareem Gad
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot i'll try that out and let you know
------------------
KaReEm
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic