This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Any APi for printing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Any APi for printing" Watch "Any APi for printing" New topic
Author

Any APi for printing

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
Is there any API available doing a printing task through java code? I want something which can help in printing using a shared printer also.

regards,
Surendar


SCJP 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35437
    
    9
You mean something like the javax.print API?


Android appsImageJ pluginsJava web charts
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
Yes, I need something like the javax.print API. but the API should support printing pdf files basically and any other report generation formats. Any third party API is also fine.

regards,
Surendar
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35437
    
    9
The Java printing API is just a way to access print drivers programmatically. If the printer doesn't understand a format, there's nothing Java can do about that. Printers understand text files, and laser printers generally understand PostScript. For just about anything else (HTML, RTF, PDF, DOC etc.) you need to run the file through a rendering process that generates something the printer can understand.

E.g., for PDF have a look into https://pdf-renderer.dev.java.net/ which renders PDF using Java2D. As such, you can adapt it to do printing.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Any APi for printing
 
Similar Threads
Printing with POS Printer
Printing Reports
java printing references
how to access and print the dwg files in java
Looking for printing code samples