LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-22-2021, 12:27 PM   #1
jcun4128
LQ Newbie
 
Registered: Jun 2021
Posts: 12

Rep: Reputation: Disabled
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.
 
Old 06-22-2021, 08:41 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
Quote:
Then hopefully they'd have their own custom folder to output their printed pdfs.
By default, cups-pdf places output in /var/spool/cups-pdf/${USER} (see cups-pdf.conf).

I would have thought preserving fillable fields is a client side task.
 
Old 06-22-2021, 09:21 PM   #3
jcun4128
LQ Newbie
 
Registered: Jun 2021
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hmm I wonder if the multiple-printers idea is flawed too, I'll look into it.
 
Old 06-22-2021, 09:27 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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

Last edited by michaelk; 06-22-2021 at 09:31 PM.
 
Old 06-22-2021, 11:27 PM   #5
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
Old 06-23-2021, 10:09 AM   #6
jcun4128
LQ Newbie
 
Registered: Jun 2021
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
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.

Thanks for the thoughts.

Last edited by jcun4128; 06-23-2021 at 11:28 AM.
 
Old 06-23-2021, 02:32 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Quote:
Wondering where I missed that.
My memory might be slipping... Its been awhile.

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.

Are the forms XFA format?
 
Old 06-23-2021, 05:43 PM   #8
jcun4128
LQ Newbie
 
Registered: Jun 2021
Posts: 12

Original Poster
Rep: Reputation: Disabled
I don't know about the XFA format. I can look into it. I am just printing directly, no samba.

I still have to figure out what driver to use for Mac.

Another thought is a proxy before the printer and that captures data but probably not if it's a printer protocol (not like a webserver proxy).

Ayeee look at that RTFM as they say:

Quote:
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.

Last edited by jcun4128; 06-23-2021 at 11:21 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Create Fillable PDF Forms With LibreOffice Writer LXer Syndicated Linux News 0 02-28-2019 03:00 AM
[SOLVED] Problem with fillable PDF form teboil12 Linux - General 3 01-27-2016 09:05 AM
Fillable PDF questions FlyerDan69 Linux - Software 8 09-11-2013 07:57 AM
CentOS 6.2, USB printer, CUPS says printed successfully but page is not printed stase Linux - Desktop 5 07-03-2012 06:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration