I have printers at my school on what I assume is a LAN (I can print and access config site only while connected to the same network).
The way it works now is that a students send a print job to an industrial plotter. Dedicated staff working the plotters then have to actually release the job from the printer's job queue webpage after verifying the job is oriented correctly (printer's width is 32"), etc.
I want to centralize printing onto one server, instead of students sending prints from their os, I want to have them upload the file to my server through a website and the server takes care of the rest, from verifying dimensions of the PDF to releasing the print in the plotter. I plan to use a Raspberry Pi (kept on 24/7) connected to the network to run my python script so that the printers are accessible to it.
I have heard of the CUPS API which has a python wrapper that suits my Flask app needs. At the same time, unix systems have the lp and lpr commands to interact with network and local printers.
What I've been doing is making subprocess.Popen() calls to execute lp and it does indeed send to the chosen plotter but that leaves actually releasing the job from the queue for the printer to print.
My solution is to automate selenium to open the plotter's job queue page and find the elements I need to analyze and/or click so that the job actually starts printing.
I was wondering if the actual releasing of the job could be done with the CUPS API? Or even with lp/lpr?
Aucun commentaire:
Enregistrer un commentaire