It's not a secret anymore!*
The moose likes Java in General and the fly likes Java Print Service question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Print Service question" Watch "Java Print Service question" New topic
Author

Java Print Service question

xingxing Wang
Greenhorn

Joined: Apr 26, 2006
Posts: 7
hey:

Did anybody use java print service before? Is it good one to print a HTML or PDF file programatically using its API? Any sample code?

Thank you in advance.
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
I'd rather use some more advanced implementations of the printing API like those offered by some open source projects such as Jasper Reports or JFreeReport

Would that help you?
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
PrintService is not the same as Jasper (and probably JFreeReport, which i dont know). Jasper is used to generate reports (in various formats as XLS, PDF, HTML, ...) while PrintService is used to get the data to the printer.
There is no direct support in java to print PDF even though there is a PDF doc flavor. (none that i am aware of)! you need a third party library (probably commercial) or go some extra miles (e.g. convert to PS first and then send this to the printer or use apache FOP to generate the PDF then you can also print it).

if you are looking for ways to generate PDF then there are some free solution that can be used like a printer where you print your document to a software printer which outputs PDF (i think iText is a solution for this)


pascal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Print Service question
 
Similar Threads
printing a microsoft word document file using java
JNI - Working with Printer
How to select a tray in java print service?
No instance of PrintService is being created
How we can print the content of JTextArea