Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alternate ideas to call a CUPS print server

 
Stephen Tret
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a java web service that prints PDFs to network printers using CUPS 1.4 software. I pass the following command using the API

I have also used the StreamGobbler classes in threads to consume any output/error messages.

As long as the web service is single threaded everything works fine. But in a multithreaded environment, ocassionally Webspshere stops responding until the server is stopped and restarted again. And there are no error messages on system.out or system.err logs. It looks like the applications server just stalls (at times) when it communicates with the print server when multithreading.

Is there a better way to design this application, so I can still print the PDFs to CUPS? Thanks.
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Javaranch.
We ask that you SearchFirst. You'll find many options for printing PDF's in this topic.
 
Stephen Tret
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I will do that
 
Wim Vanni
Ranch Hand
Posts: 96
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could look into Cups4J.
There's also an ippclient api somewhere on the web.

Maybe this could be of help to you.

Cheers
Wim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic