• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing from java  RSS feed

 
age spets
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure some of you have had this challenge before and solved it, so
I'm bravely asking.

Printing (rtf's and pdf's) from a java web-application running under WAS
5.1 on an i5.

The story is that I'm generating an rtf or a pdf document based on some
user activity on the web. This document is processed in batch (the user
will not see it until it is printed) and should be printed on a
predefined (for the user) network (not i5) printer.

Any hints or suggestions.

Rgds Age
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can not print PDFs directly from java... third party libs or some other tricks are required.

the only java lib to print PDF's i tried is http://activetree.com/ (it's commercial and they offer client or server licenses...)

other solutions:
- using apaches FOP to generate the documents (you can send stuff directly to the printer like this)
- use the (undocumented) command line switches of acrobat reader
- use ghostscript (http://www.cs.wisc.edu/~ghost/) to convert the PDF to PS and then send the PS to printer
- probably some other (better ? i would be interested) options


pascal
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!