harwey / cups4j

Cups4j Java printing library for CUPS/IPP
http://cups4j.org
GNU Lesser General Public License v3.0
130 stars 64 forks source link

Compatibility with cups 1.6.3 #71

Closed nrbw closed 1 year ago

nrbw commented 1 year ago

Hello,

I have a rather old instance of CUPS (1.6.3) I'm working with and I'm not able to obtain the list of printers for my cups server.

  CupsClient cupsClient = new CupsClient("cupsServer", 631);
  cupsClient.getPrinters(); // returns empty List

When I try the URL through my browser, http://cupsServer:631/printers , the list of 6 printers is shown in a nice html page, as an anonymous user. When creating the cupsClient, I tried adding the administrator credentials in a CupsAuthentication object with no success.

Is cups4j compatible with this version of cups ? Do I need to pay attention to other parameters ? What can I test to ensure I correctly initialized the cups client ?

nrbw commented 1 year ago

Sorry for the trouble, my printers were not configured as "shared" in cups. I managed to list the printers and print a document.