开源中文网

您的位置: 首页 > Ubuntu Linux > 正文

ubuntu 打印出 pdf 文件

来源:  作者:

windows下我一般用 acrobat(不是 acrobat reader),linux 下可以用 cups-pdf


via Print to PDF using cups-pdf March 23, 2006

I have been looking for a solution to print any file to pdf using a pdf printer driver.

cups-pdf is the package I was looking for apparently. But unfortunately, this takes just a little setting up.

Install cups-pdf by using:
$sudo apt-get install cups-pdf

Edit /etc/cups/cupsd.conf and change the line that says:
RunAsUser Yes
to
RunAsUser No

Restart cupsys:
$sudo /etc/init.d/cupsys restart

Add a new printer (System->Administration->Printing) selecting the “Local Printer” “PDF Printer” option. In the next step choose “Generic Printer” and then used the “Postscript Color Printer (Ver 3)” driver.

Now you should be able to print to pdf by selecting the newly setup printer.

Cribs:
1) The output .pdf files are stored in your “Home” directory. I can’t find a way to change this output directory to something of my liking
2) The output files are named with pre-defined names (job_8-untitled_document.pdf is an example). It would have been nice to select a name while printing.
3) One shouldn’t have to edit the cupsd.conf file to enable printing! (I found that I might have to edit the configuration file by visiting the homepage of the package, and trying out what I did). At the very least, the README.Debian file for the package should have informed me of the need to edit the configuration file.

Tags:ubuntu 打印PDF文件
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明