Controlling print jobs using CUPS API

Hello everyone !

So I am using CUPS installed on a linux machine as a printer server in a local network of a samall 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

Thank you in advance ^^

Hi Charima,

Welcome to our forums.

While my advice is not related to the API, you might want to check out the cups-pdf package, which is available for most major distributions. My theory would be the following workflow:

1.) print all incoming jobs to pdf on the printer server
2.) process the files as needed
3.) forward the pdf files to the actual physical printers when processing is done

Note that I am unable to setup such an environment to test this theory, but it seems to me that this could do the trick.

1 Like

Thank so mcuh for your answer, however I want to hold all new printer jobs, check the cartridge levels of my printer and one by one release jobs for printing.
After this, I have to find out how to get all jobs that are on-hold and release one For completeness, the jobs are held until cartridges are reset and a button is pressed.
And I am searching for a solution using pycups in Python or <cups/cups.h> in C.