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 customize customize-engine-uglify --save-dev ``` 2. **配置构建脚本**:然后,在项目构建脚本中引入`customize-engine-uglify`,并设置所需的压缩选项。例如,如果你使用的是`customize`,配置...
- **Setting Up the Environment**: Instructions on how to download and install Eclipse, along with recommendations for additional plugins and tools. - **Navigating the Workbench**: An overview of the ...
npm install -D react-app-rewired customize-cra customize-cra-react-refresh 创建或更新您的config-overrides.js const { override } = require ( "customize-cra" ) ; const { addReactRefresh } = require ( ...
其中,“customize-engine-handlebars”是一个专注于Handlebars模板引擎的前端开源库,它提供了强大的自定义能力,使开发者能够更灵活地利用Handlebars进行项目开发。 Handlebars是一种轻量级的模板语言,以其简洁...
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 ...
在.NET开发环境中,自定义控件的外观是提升应用程序用户界面(UI)独特性和吸引力的重要方式之一。在本文中,我们将深入探讨如何针对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 springboot-starter.rar"的压缩包中,包含了自定义`spring-boot-starter`的源码和测试文件,我们可以从以下几个方面来理解这个知识点: 1. **Spring Boot Starter 概念**: `spring-boot-...
如何在WPF GanttControl中自定义特定组的颜色 本文介绍了如何自定义Syncfusion WPF Gantt控件中的各种颜色的特定行,如下图所示。 这可以通过考虑每个节点项并通过以下步骤通过GanttGrid模型QueryCellInfo事件...
【标题解析】:“frontend open-source library - customize-engine-less”直译为“前端开源库 - customize-engine-less”,这里的“customize-engine”通常指的是一个用于处理个性化定制的引擎,而“less”则是层叠...
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 ...
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 ...
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自定义写入文件、将自定义运行结果存储在本地目录中的后处理器
在.NET框架中,Windows Presentation Foundation (WPF) 是一个用于构建桌面应用程序的强大工具,而DevExpress的DXScheduler for WPF(旧版)是一个流行的组件,它提供了丰富的日程管理功能。这个示例主要聚焦于如何...