A cups "Hello World" using Java sample & JAVADOCS

Elly K trcmrekb at gmail.com
Sun Dec 6 19:01:59 PST 2009


> On Dec 6, 2009, at 9:30 AM, E K wrote:
> > Hello list,
> >=20
> > I am trying to create a simple Java program that will print PDF files =
> through CUPS, but I can't seem to find any simple sample Java programs =
> out there on Google using CUPS and Java.
> >=20
> > Is there some CUPS jar files / API / javadocs / books that I could =
> refer to get a simple program going? I would sincerely appreciate any =
> pointers.  Thanks for your time.
> > EK
>
>
> Are you trying to just print existing files, or capture drawing from =
> Java to send to the printer?
>
> CUPS used to include a simple Java IPP class that allowed Java programs =
> to submit print jobs and monitor jobs and queues, but it was largely =
> unmaintained and was dropped in CUPS 1.4.
>
> Java also includes basic IPP printing support, however Sun's =
> implementation is very buggy...
>
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
>
>
>

Yes Michael, Thanks for your response.  I want to silent print existing PDF files, I am creating PDF files using Java/iText and the user doesn't want to open the PDF files and print it.  So in the background the PDF file gets created and gets sent to the printer directly.

Currently we do use CUPS 1.1 to perform this silent print, We have it on a zLinux (SUSE) virtual server on the mainframe. But the Java program that creates the PDF submits a JCL job and then the job calls another print server software which directs it to the CUPS print server.  I would like to take all that clutter out and use the same Java program that created the PDF file to talk to the CUPS printer directly. Another serious disadvantage with the existing method is that CUPS doesn't reply back to the Java program (on success or failure)

Is there a way to do it? From what little I've read on CUPS documentation, it looks like it takes in "sort of" command line parameters.  Can I simulate that using my Java program? As I mentioned earlier, I know some Java and little to nothing on CUPS. So is there a better way to silent print PDF's other than using CUPS?

I liked CUPS because I've a weakness for open source (although the version we have on the mainfame came from Novell SUSE Linux 10)




More information about the cups mailing list