特殊:Badtitle/NS100:PDFPrinting
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/PDFPrinting }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/af | • {{#if: UbuntuHelp:PDFPrinting|Afrikaans| [[::PDFPrinting/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ar | • {{#if: UbuntuHelp:PDFPrinting|العربية| [[::PDFPrinting/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/az | • {{#if: UbuntuHelp:PDFPrinting|azərbaycanca| [[::PDFPrinting/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/bcc | • {{#if: UbuntuHelp:PDFPrinting|جهلسری بلوچی| [[::PDFPrinting/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/bg | • {{#if: UbuntuHelp:PDFPrinting|български| [[::PDFPrinting/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/br | • {{#if: UbuntuHelp:PDFPrinting|brezhoneg| [[::PDFPrinting/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ca | • {{#if: UbuntuHelp:PDFPrinting|català| [[::PDFPrinting/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/cs | • {{#if: UbuntuHelp:PDFPrinting|čeština| [[::PDFPrinting/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/de | • {{#if: UbuntuHelp:PDFPrinting|Deutsch| [[::PDFPrinting/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/el | • {{#if: UbuntuHelp:PDFPrinting|Ελληνικά| [[::PDFPrinting/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/es | • {{#if: UbuntuHelp:PDFPrinting|español| [[::PDFPrinting/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/fa | • {{#if: UbuntuHelp:PDFPrinting|فارسی| [[::PDFPrinting/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/fi | • {{#if: UbuntuHelp:PDFPrinting|suomi| [[::PDFPrinting/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/fr | • {{#if: UbuntuHelp:PDFPrinting|français| [[::PDFPrinting/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/gu | • {{#if: UbuntuHelp:PDFPrinting|ગુજરાતી| [[::PDFPrinting/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/he | • {{#if: UbuntuHelp:PDFPrinting|עברית| [[::PDFPrinting/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/hu | • {{#if: UbuntuHelp:PDFPrinting|magyar| [[::PDFPrinting/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/id | • {{#if: UbuntuHelp:PDFPrinting|Bahasa Indonesia| [[::PDFPrinting/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/it | • {{#if: UbuntuHelp:PDFPrinting|italiano| [[::PDFPrinting/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ja | • {{#if: UbuntuHelp:PDFPrinting|日本語| [[::PDFPrinting/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ko | • {{#if: UbuntuHelp:PDFPrinting|한국어| [[::PDFPrinting/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ksh | • {{#if: UbuntuHelp:PDFPrinting|Ripoarisch| [[::PDFPrinting/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/mr | • {{#if: UbuntuHelp:PDFPrinting|मराठी| [[::PDFPrinting/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ms | • {{#if: UbuntuHelp:PDFPrinting|Bahasa Melayu| [[::PDFPrinting/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/nl | • {{#if: UbuntuHelp:PDFPrinting|Nederlands| [[::PDFPrinting/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/no | • {{#if: UbuntuHelp:PDFPrinting|norsk| [[::PDFPrinting/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/oc | • {{#if: UbuntuHelp:PDFPrinting|occitan| [[::PDFPrinting/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/pl | • {{#if: UbuntuHelp:PDFPrinting|polski| [[::PDFPrinting/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/pt | • {{#if: UbuntuHelp:PDFPrinting|português| [[::PDFPrinting/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ro | • {{#if: UbuntuHelp:PDFPrinting|română| [[::PDFPrinting/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/ru | • {{#if: UbuntuHelp:PDFPrinting|русский| [[::PDFPrinting/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/si | • {{#if: UbuntuHelp:PDFPrinting|සිංහල| [[::PDFPrinting/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/sq | • {{#if: UbuntuHelp:PDFPrinting|shqip| [[::PDFPrinting/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/sr | • {{#if: UbuntuHelp:PDFPrinting|српски / srpski| [[::PDFPrinting/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/sv | • {{#if: UbuntuHelp:PDFPrinting|svenska| [[::PDFPrinting/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/th | • {{#if: UbuntuHelp:PDFPrinting|ไทย| [[::PDFPrinting/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/tr | • {{#if: UbuntuHelp:PDFPrinting|Türkçe| [[::PDFPrinting/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/vi | • {{#if: UbuntuHelp:PDFPrinting|Tiếng Việt| [[::PDFPrinting/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/yue | • {{#if: UbuntuHelp:PDFPrinting|粵語| [[::PDFPrinting/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/zh | • {{#if: UbuntuHelp:PDFPrinting|中文| [[::PDFPrinting/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/zh-hans | • {{#if: UbuntuHelp:PDFPrinting|中文(简体)| [[::PDFPrinting/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:PDFPrinting | UbuntuHelp:PDFPrinting | {{#if: | :}}PDFPrinting}}/zh-hant | • {{#if: UbuntuHelp:PDFPrinting|中文(繁體)| [[::PDFPrinting/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:PDFPrinting|:PDFPrinting|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :PDFPrinting/zh | | {{#ifexist: PDFPrinting/zh | | {{#ifeq: {{#titleparts:PDFPrinting|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:PDFPrinting|1|-1|}} | zh | | }}
<<Include(Tag/Unsupported)>>
<<Include(Tag/Deletion)>>
Most Gnome applications and OpenOffice.org can generate PDF documents without adding anything special. However, if you wish to create PDF files from any application that can print, you need to install cups-pdf
and create a virtual PDF printer.
Instructions for Ubuntu 6.06 LTS, 6.10 and 7.04
- Install the
cups-pdf
package. - If you are using Ubuntu 6.06 (due to bug 42147) it is necessary to manually change one file in order to add the PDF printer:
sudo chmod +s /usr/lib/cups/backend/cups-pdf
You may skip this step if you are using version 6.10, or higher, of Ubuntu.
- From the menu, select System -> Administration -> Printing. Via the "Printers" dialog, opt to add a New Printer.
- There should now be a "PDF Printer" under the list of detected printers. Select the "PDF Printer" and press "Forward".
- Select Generic as the manufacturer and the postscript color printer (this name may vary slightly) as the model; then press "Forward".
- Give the printer a name such as "PDF-Printer" (the name should not have any spaces).
You can now create PDF files by using the Print option from your programs. To print a test page, try:
- Right click on the newly created printer, and select Properties
- Click "Print a Test Page"
The printer sends PDF files to your Home folder, under the PDF folder.
Instructions for Ubuntu 5.10
Install the cups-pdf package from universe and restart cups
sudo apt-get install cups-pdf sudo /etc/init.d/cupsys restart
Cups-PDF should be working for Gedit and abiword and a few other apps. If you need more general PDF creation, continue. Update Cupsd.conf Cups requires changing permissions to get Cups-PDF to work for other applications: Quote Leszek Tarkowski:
You have to edit /etc/cups/cupsd.conf sudo nano /etc/cups/cupsd.conf change RunAsUser from Yes to No. sudo /etc/init.d/cupsys restart
This will cause cups to run as root, rather than as a user. This is necessary for Cups-PDF, but could be a security risk if a hackable bug is found in cups. Use your judgement and stay on top of Ubuntu Security updates. Create the pdf-printer in your gnome-printer-setup
System--> Administration--> Printing Add printer Select "Local Printer" and use a "detected printer--> PDF printer". Manufacturer--> Generic, Model-->PostScript Color Printer, Driver-->Should come preselected with a green dot (rev3a) Apply
Test it out
Open any app and print using the new "postscript-color-printer". PDFs are created in your home folder in a PDF subfolder (~/PDF/)
Rename the printer
If you want a name better than "postscript-color-printer" sudo nano /etc/cups/printers.conf Change <Printer postscript-color-printer> to <Printer PDF-Printer> sudo /etc/init.d/cupsys restart
Name can be anything that doesn't have spaces, #, or /
Comments
At one point, this page was updated based on a HowTo posted in the forums: http://ubuntuforums.org/showthread.php?t=140815