So I am using CUPS installed on a linux machine as a printer server in a local network of a small company.
The problems is that, before directly sending the Print job to the network printer, I want to store it in the server itself for a moment.
I've actually searched in the CUPS APIS' function but without any result . So If you have any idea or hint that can help me just mention it please, note that I am using <cups/cups.h> library for programming
Let's say you can... Then how will the print server know it needs to be printed after?
In other words, stopping a print queue has no way to my knowledge to automatic enabling after, so if you choose to have the jobs queued, just disable the queue/s then when you wish enable the queue again, you could try a variant that would be create an alias for you of a queue, and disable that, you then have for a same printer a queue that prints directly and one that queues jobs...
I don't really understand your point, I will be pleased if you can give me more explanations.
To set the record straight, I'm working on a project where I need to control the printing jobs on a CUPS server through an authentication system.
That is to say, after launching a print request to the server, it will remain on hold until the server is authenticated through a badge.
So I am actually searching the way to store the printing job in the server until the authentication.
? Do the clients have to authenticate themselves at the server? Or the server at somewhere else? In that case, why, in which cases and how?
Generally you can put a reverse proxy in front of many, many services, not only HTTP/S (one of the most common use cases in the web). Sometimes it's called relay. Usually it takes the incoming requests and data on the same port as the 'real' service, using the correct protocol. Then it does some magic stuff based on and maybe with the data, and then sends it, using the same protocol, but not necessarily the same port, to the 'real' service(s), or other (reverse) proxies, local or remote.
I am sorry i meant the client, not the server.
That is to say, after launching a print request to the server, it will remain on hold until the client is authenticated through an RFID badge.
I don't think so because the main goal is not disabling or enabling CUPS, I just need to store the print job until authentication. But thank you anyways for your reply I really appreciate it, I will check that link and search for more commands ^^
No problem, thanks for clarification. However, it looks a bit strange to me that the server first accepts the request and then has to wait until the client has authenticated itself. Usually it goes the other way around.
What exactly does the process (auth/print-request) look like on the client side?
I am still in the design and searching part of the project so I am discovering as I go along its needs and to be honest it's getting more complicated.
Can you please explain what do mean by
Usually it goes the other way around
And I am actually open for any suggestion or idea that can help me to implement this project.
that is, the client should authenticate itself at the cups server before it is allowed to send a print request to the server. The way you want to do it, the problem arises that the print requests have to be queued on server side (which is your original question).
If the client has to be authenticated, this of course must be set up on both sides. On client side so that the creds are queried locally, i.e. at the client itself. And on server side, obviously these creds have to be validated, too (how?), but before the print request.
So the procedure would be something like open doc on client -> click print -> ask for/check auth via RFID -> post auth (client) -> validate auth (server).
Only if auth is ok, the client is allowed to post print request -> server sends job to printer.
when the client will click on print, the printing request will be directly sent to CUPS and the file will be prinetd.
Here is the workflow that i want to implement:
The client click print -> CUPW Server holds the print job (store the request) -> the client pass his badge on the RFID reader -> validate auth -> CUPS server send the print job to the printer
It's because in my project I have shared printer in a local network. So after launching the print request, the client will go to the printer, pass his RFID badge and the appropriate file will be immediately printed.
By the way than you so much for your replies I appreciate it !
This is the first time I halfway get the gist of what you're after.
This is an EXTRA authentication. The client computer needs to be authorized to send print jobs to the server, to be HELD in a print queue. The client person has to physically move and to "release for print" by applying an authentication thingy to - well, where to? The server? The printer? An extra RFID reader? What if they've got more than one job in the queue? Or, mayhap, in several queues of that server?
I'm afraid you'll need to write some scripts of your own - I'm not aware of a standard solution. How does your HW setup look like?
Yes axaclty and I am totally aware that there is not a standard solution for that and I will be obliged to writ the appropriate scipt fot it, that's exactly why I am trying to decompose the prject to the right way to do it.
Talking about the hardware, I will be having an RFID reader connected to raspberry Pi and a Linux machine where i will intall the CUPS.
I think that i will be using cupsenabale and cupsdesable with the options --hold and --release respectively but i just need to understand more their implementation and use spcially, like you've said, when i will have more than one job