• 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

Alternate ideas to call a CUPS print server

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, I will do that
 
Ranch Hand
Posts: 96
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic