This tutorial will set up a virtual PDF printer that outputs files named with a timestamp into the folder ~/PDF.
Install CUPS-PDF in Debian
#aptitude install cups-pdf
Configuring CUPS-PDF
Now go to http://localhost:631″ in a browser,Add the virtual printer, choosing among the options presented,When prompted for a username and password, use "root" as your username and... your root password as your password!
Now go to Menu > Settings > Printing System Settings, select "CUPS"
Configure output settings
# vi /etc/cups/cups-pdf.conf
To change the folder where generated PDF folders are created, edit the line "Out ${HOME}/PDF" to whatever you like.
CUPS-PDF doesn't allow you to change the name of the resulting file, so if you want to customize the filename, use the built-in post-processing option. Still in cups-pdf.conf, uncomment "PostProcessing" and set it to "/usr/local/bin/cups-pdf-renamer".
Create a simple shell script
# vi /usr/local/bin/cups-pdf-renamer
Paste the following code into that file:
#!/bin/bash
FILENAME=`basename $1`
DIRNAME=`dirname $1`
DATE=`date +"%Y-%m-%d_%H:%M:%S"`mv $1 $DIRNAME"/"$DATE".pdf"
Save and exit the file.
Finally, give the script proper permissions
# chmod 755 /usr/local/bin/cups-pdf-renamer
Now when you choose to print with cups-pdf, you should see a file with a name like "2009-03-16_10:57:03.pdf" in your ~/PDF directory.
Incoming search terms:
- cups-pdf (78)
- cups-pdf postprocessing (72)
- cups-pdf debian (55)
- debian cups-pdf (54)
- debian pdf printer (48)
- cups pdf (47)
- debian cups pdf printer (43)
- cups pdf debian (36)
- debian print to pdf (25)
- configure cups debian (24)
-
Al
-
Collins
-
Collins
-
Isaac Izquierdo
-
Jerry
-
http://www.proyectopideudneseomexico.org celiapgt
-
firehawk256
-
Johnny
-
Duane
-
David
-
Odus
