CUPS-PDF provides a PDF Writer backend to CUPS. This can be used as a virtual printer in a paperless network or to perform testing on CUPS.Documents are written to a configurable directory (by default to ~/PDF) or can be further manipulated by a post-processing command.
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.
相关推荐
VCL Layout Control - How to Create and Customize a Simple Layout [720p]
npm install -D react-app-rewired customize-cra customize-cra-react-refresh 创建或更新您的config-overrides.js const { override } = require ( "customize-cra" ) ; const { addReactRefresh } = require ( ...
Akka in Action shows you how to build message-oriented systems with Akka. This comprehensive, hands-on tutorial introduces each concept with a working example. You’ll start with the big picture of ...
How to install and test jQuery Techniques to manipulate content and attributes Ways to filter and map a selection or an array The difference between GET and POST How to easily show, hide, slide, ...
Best-selling author Adam Freeman begins by describing the MVC pattern and the benefits it can offer and then shows you how to use Angular in your projects, starting from the nuts-and-bolts and ...
This book will help you expand your horizons by teaching you the skills needed to successfully design, customize, build, and deliver real-world applications in AngularJS. We will start off by setting...
要查看的文件: (VB: ) (VB: ) 如何自定义AccordionControl外观 本示例演示如何使用标准属性 , , 和定制和外观。
Best-selling author Adam Freeman begins by describing the MVC pattern and the benefits it can offer and then shows you how to use Angular in your projects, starting from the nuts-and-bolts and ...
前端开源库-customize-engine-handlebars自定义引擎把手,将把手用作自定义引擎
如何在WPF GanttControl中自定义特定组的颜色 本文介绍了如何自定义Syncfusion WPF Gantt控件中的各种颜色的特定行,如下图所示。 这可以通过考虑每个节点项并通过以下步骤通过GanttGrid模型QueryCellInfo事件...
Best-selling author Adam Freeman begins by describing the MVC pattern and the benefits it can offer and then shows you how to use Angular in your projects, starting from the nuts-and-bolts and ...
With this book, you 'll learn: - How to quickly create beautiful graphics using ggplot2 packages - How to properly customize and annotate the plots - Type of graphics for visualizing categorical and ...
customize starter 的一次记录,以及方便以后的参阅 自定义的 spring-boot-starter 源码 及测试文件
Spring expert Craig Walls uses interesting and practical examples to teach you both how to use the default settings effectively and how to override and customize Spring Boot for your unique ...
前端开源库-customize-engine-less定制引擎少,定制引擎少
前端开源库-customize-engine-uglify自定义引擎uglify,uglifyjs适配器以进行自定义
in your `requirements.txt` to avoid trying to install newest source package. ### Install from source 1. Download source by `git clone` or [zipfile]...
前端开源库-customize-write-files自定义写入文件、将自定义运行结果存储在本地目录中的后处理器
要查看的文件: (VB: ) (VB: ) 如何自定义调度程序视图 本示例演示如何自定义Scheduler视图并在它们之间切换。