• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Did anyone ever use cups4j?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic