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

LPrint API? #28

Closed
SonnyX opened this issue Dec 9, 2020 · 3 comments
Closed

LPrint API? #28

SonnyX opened this issue Dec 9, 2020 · 3 comments
Assignees
Labels
question General usage question

Comments

@SonnyX
Copy link

SonnyX commented Dec 9, 2020

Is there any API through either lprint or through CUPS in order to add an label printer using the drivers from lprint application?

@michaelrsweet
Copy link
Owner

@SonnyX Yes, the CUPS API will let you send IPP Create-Printer (IPP_OP_CREATE_PRINTER) to the lprint server. You can use the "lprint-add.c" code as a template for your own implementation.

@michaelrsweet michaelrsweet self-assigned this Dec 9, 2020
@michaelrsweet michaelrsweet added the question General usage question label Dec 9, 2020
@SonnyX
Copy link
Author

SonnyX commented Dec 17, 2020

@michaelrsweet Thank you, I've implemented similar code to what's inside of lprint-add.c, is there also a way to get the available lprint drivers names and descriptions programmatically through cups?
I've looked inside of lprint-drivers.c and driver-common.c, however did not see an immediate way to do so.

@michaelrsweet
Copy link
Owner

@SonnyX You can do a Get-System-Attributes (IPP_OP_GET_SYSTEM_ATTRIBUTES) request to get the smi4699-device-command-supported attribute which lists the supported drivers.

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

No branches or pull requests

2 participants