jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "Did anyone ever use cups4j?" Watch "Did anyone ever use cups4j?" New topic

Did anyone ever use cups4j?

zhong zero

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

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();

I agree. Here's the link: http://aspose.com/file-tools
subject: Did anyone ever use cups4j?
It's not a secret anymore!