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

Adding a printer through cups library #516

Closed
Krishnanudhaya opened this issue Nov 1, 2022 · 1 comment
Closed

Adding a printer through cups library #516

Krishnanudhaya opened this issue Nov 1, 2022 · 1 comment
Labels
question General usage question

Comments

@Krishnanudhaya
Copy link

Thank you very much for the response on [Unable to add the ipp network printer to cup server #514]
(#514)
and pointing out towards the https://openprinting.github.io/cups/doc/spec-ipp.html#CUPS_ADD_MODIFY_PRINTER.

We tried with the below printing library for CUPS, where we couldn’t find the Add Printer method.
i) Java library - https://github.com/harwey/cups4j
ii) Kotlin Library - https://github.com/gmuth/ipp-client-kotlin

Could you suggest any other library for adding printers? Or is it something we should develop a method for adding a printer? Please advise a better way to handle this. Our objective is adding a printer from our own web UI through a Library/SDK/API without using cups web UI.

Below are the available methods in Java library - https://github.com/harwey/cups4j

https://github.com/harwey/cups4j/blob/master/src/main/java/org/cups4j/CupsClient.java

getPrinters()
getDefaultPrinter()
getPrintersWithoutDefault()
getPrinter(URL printerURL)
getPrinter(String printerName)
getPrinterOnCurrentHost(String printerURL)
getJobAttributes(int jobID)
getJobAttributes(String userName, int jobID)
getJobAttributes(String hostname, String userName, int jobID)
getJobs(CupsPrinter printer, WhichJobsEnum whichJobs, String userName, boolean myJobs)
cancelJob(CupsPrinter printer, int jobID)
holdJob(CupsPrinter printer, int jobID)
releaseJob(CupsPrinter printer, int jobID)
moveJob(int jobID, String userName, CupsPrinter currentPrinter, CupsPrinter targetPrinter)

Below are the available methods in Kotlin Library - https://github.com/gmuth/ipp-client-kotlin

https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/CupsClient.kt

getPrinters()
getPrinter(name: String)
getDefault()

https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt

Identify-Printer
Printer administration
Get-Printer-Attributes
Validate-Job
Print-Job (with subscription support)
Print-URI
Create-Job
Get-Job-Attributes (as IppJob)
Get-Jobs (as List)
Create-Printer-Subscription
Get-Subscription-Attributes (as IppSubscription)
Get-Subscriptions (as List)

Thanks,

@zdohnal
Copy link
Member

zdohnal commented Nov 1, 2022

Hi @Krishnanudhaya ,

I know about pycups python module, GTK and QT implement wrapper layer as well.

@zdohnal zdohnal closed this as completed Nov 1, 2022
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