Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make getPrinters return CupsPrinter objects with a correct isDefault() return value #57

Open
biergit opened this issue Jan 11, 2022 · 0 comments

Comments

@biergit
Copy link

biergit commented Jan 11, 2022

See

public List<CupsPrinter> getPrinters() throws Exception {
return new CupsGetPrintersOperation(port).getPrinters(host, port, creds);
}
/**
* Returns all available printers except CUPS specific default printer
*
* @return List of Printers
* @throws Exception
*/
public List<CupsPrinter> getPrintersWithoutDefault() throws Exception {
CupsGetPrintersOperation cgp = new CupsGetPrintersOperation();
List<CupsPrinter> result = cgp.getPrinters(host, port, creds);
return result;

Alternatively get rid of the default property altogether and only make access to the default printer available via a separate method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant