This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Did anyone ever use cups4j? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Did anyone ever use cups4j?" Watch "Did anyone ever use cups4j?" New topic
Author

Did anyone ever use cups4j?

zhong zero
Greenhorn

Joined: Jul 24, 2011
Posts: 1
I found CUPS4J a few days ago. It's an open source library for ipp print. And I want to use it in my application.
Its site only show a C/S version example. And I want to use without the server.
Did anyone try this? If so,can you show me an example.

By the way,are there other libraries that provide ipp print API except javax.print and cups4j?
Bart Mc
Greenhorn

Joined: Aug 24, 2011
Posts: 1
Little late to the party but I found your post looking for a sample, I have a simple USB printer that i pass raw ESC/P (Epson printer language files) to on a linux machine.
Its about as simple as it gets in terms of printing. javax.print was the other option, it seems to try to do too much and mess up my esc/p files.

So, here's a simple example to print a file via CUPS through java.

CupsClient cc = new CupsClient();
CupsPrinter cp = cc.getDefaultPrinter();
InputStream is = new FileInputStream("/home/bart/real.escp");
org.cups4j.PrintJob pj = new PrintJob.Builder(is).build();
cp.print(pj);


--
Bart
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Did anyone ever use cups4j?
 
Similar Threads
IPP Printer check
SCWCD-ified
JPS - printing to IPP printer
Java Remote Printing Issue
Network printing issue >(^.^)>