[SOLVED] Some questions about cups-pdf (fillable forms and who printed)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Some questions about cups-pdf (fillable forms and who printed)
I have setup a cups-pdf printer on Ubuntu and I'm able to print from my Windows 10 client.
One thing I'd like to ask one more time (though I believe I have the answer already), is there any way to preserve the fillable fields when you print a fillable PDF from. Particularly say at the ghostscript call or something, some filter you turn off.
Other than that, my other concern is how to tell who printed what document. Looking around in the logs I don't see an IP associated with a file name. So I'm wondering how would I keep track of who printed what document/file? I can associate people uuids/modify the file names with server-side code (nodejs) but wondering from cups-pdf side about identifying information like IP.
The "worst" scenario/case I can think of is every person gets a unique printer name... I mean why not. In this particular use case a person would have a single session at a time and each time they'd start from a blank slate (no previously printed documents).
Then hopefully they'd have their own custom folder to output their printed pdfs.
I'd appreciate any other thoughts/insight that might be a smarter plan.
Typically cups-pdf will save the pdf to /var/spool/cups-pdf/name or ANONYMOUS if the owner of the print document is unknown. The owner is sent from the client. In some distributions the default is /home/user/pdf but can be modified. Check the documentation.
I cannot remember what is in the page log but it is possible to increase log level to meet your needs.
I haven't tried fillable forms so I don't know how well it works
Using cups to print fillable pdf forms can be done one of 2 ways on my machine/printer.
If I want a printed page on paper I send it to the printer. If I want to save the pdf exactly as it would be printed I select "save to pdf". The second option saves the fillable form with the data in place as a pdf file that then can be printed, emailed, etc. Sending the form directly to the printer does not save a copy, other than the temporary form as it passes through the print queue.
Typically cups-pdf will save the pdf to /var/spool/cups-pdf/name or ANONYMOUS
Yeah I'm seeing that happen now. (anonymous)
Quote:
The owner is sent from the client.
Wondering where I missed that. I did struggle to get it to work as I have never used cups-pdf before. I got a driver (HP Universal Printer) and eventually figured out how to select the right url pattern to communicate with my remote server/printer. (add printer to Windows 10 printer list)
I will look into increasing the log level maybe I can get the IP. This does not seem like a plan that would scale (having to parse through logs to figure out who printed what). Hence I would make a script that can be ran by an API to add a new printer per person (in this case that's added by a dashboard).
It's a weird workflow was trying to avoid it but this is what the lords above desire at the moment.
Quote:
Using cups to print fillable pdf forms can be done one of 2 ways on my machine/printer.
If I want a printed page on paper I send it to the printer. If I want to save the pdf exactly as it would be printed I select "save to pdf". The second option saves the fillable form with the data in place as a pdf file that then can be printed, emailed, etc. Sending the form directly to the printer does not save a copy, other than the temporary form as it passes through the print queue.
We're using the printer as like a file upload of sorts... it's an interop issue where printers are widely accessible/skips steps. I think when I print the PDF to the printer, that's where the fields are stripped. We're not trying to "download" (save as pdf) then upload again.
If your printing using samba you might need to check the samba logs for access. If your printing to cups directly that would be the cups logs. I can't check my system at the moment.
To create multiple instances of the backend with different configurations, simply
copy several config files in your config directory, naming them
cups-pdf-<NAME>.conf, where <NAME> is a unique identifier for this instance.
You can then select the new instances as URI when creating a new printer in CUPS
I'm not saying it's great... but creating a conf file based on a username and having them choose that printer URL sounds better than trying to parse logs/read lines.
I'm gonna work with that and see how it goes... my concern is memory but you know machines... just get more. I think each printer I'll watch the idle RAM and CPU consumption usage... but I imagine if it's just sitting there in an idle state it won't use much.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.