Quote:
Originally Posted by michaelk
I tested it using debian versus Ubuntu but I am fairly certain it will work. Did you remove the leading '#' in front of postprocessing? Did you use the full path to your script and is it executable?
|
Hello again, unfortunately, it does not work. Do you have any ideas ? I have added all the related information below. Please help me.
I use Ubuntu.
You may find my cups-pdf.conf below:
## set this to an empty value to use no postprocessing
### Default: <empty>
PostProcessing /etc/cups/generate_pdf_filename.sh
###########################################################################
And this is my generate_pdf_filename.sh script with permission information.
PERMISSIONS
informix@legacysparc:/etc/cups$ ls -la generate_pdf_filename.sh
-rwxrwxrwx 1 root root 181 May 17 15:01 generate_pdf_filename.sh
SCRIPT
GNU nano 6.2 generate_pdf_filename.sh
#!/bin/bash
USER=$2
OLD_FILE=$1
HOSTNAME=$(hostname)
TIMESTAMP=$(/usr/bin/date +'%Y-%m-%d_%H-%M-%S')
mv "$OLD_FILE" "/home/$USER/PDF/stdntrns_${USER}_${HOSTNAME}_${TIMESTAMP}.pdf"
LPOPTIONS
informix@legacysparc:/etc/cups$ lpoptions
copies=1 device-uri=cups-pdf:/ finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 name=PDF number-up=1 OutputFile=/home/informix/PDF OutputScript=/etc/cups/generate_pdf_filename.sh page-bottom=36 page-left=36 page-right=36 page-top=36 PDF=true pdftops-renderer=pdftocairo PDFVer=1.5 print-color-mode=color printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info=PDF printer-is-accepting-jobs=true printer-is-shared=false printer-is-temporary=false printer-location printer-make-and-model='Generic CUPS-PDF Printer (w/ options)' printer-state=3 printer-state-change-time=1716237954 printer-state-reasons=none printer-type=10678348 printer-uri-supported=ipp://localhost/printers/PDF