How to Create PDF Documents in Ubuntu
Sponsored Link
We need to install cups-pdf this software is designed to produce PDF files in a heterogeneous network by providing a PDF printer on the central fileserver. It is available under the GPL and is packaged for many different distributions or can be built directly out of the source files.
Install cups-pdf
sudo apt-get install cups-pdf
You need to chnage the following file permissions
sudo chmod +s /usr/lib/cups/backend/cups-pdf
Configure CUPS for the PDF printer.
-- Select SYSTEM > ADMINISTRATION > PRINTERS > NEW PRINTER
-- Select LOCAL PRINTER
-- Use detected printer: PDF PRINTER
-- Select Print Driver:
-- Manufacturer: Generic
-- Model: Postscript Color Printer
-- Name: postscript-color-printer-rev3b
-- Click APPLY
When printing from any application, select the newly created postscript-color-printer-rev3b printer to generate PDF files.
Output files are stored in your home directory under /PDF subirectory.
To change the default location of the PDF output
Edit the /etc/cups/cups-pdf.conf file
gksudo gedit /etc/cups/cups-pdf.conf
look for
Out ${HOME}/PDF
and change to something like below
Out ${HOME}/my_print_to_pdf_folder
and restart
sudo /etc/init.d/cupsys restart
Thanks a lot bro, works like a charm!
Installed perfectly, but have a problem in printing Pages from Firefox. It prints pages frame by frame not exactly how it’s layout.
Before Installing the printer, the Print Preview was generating pages as displayed, but not now. How can I avoid this
Anyone got directions on how to do this under KDE? I’ve installed CUPS-PDF package, but it isn’t allowing me to install a local printer. =/
Man , this is magic ? works perfect my sons and daughters ::who needs windows ? LOL
Flawless. Thanks!
Nice….it is very wonderfull, and right now I don’t need windows again…:)
For some reason I can only get ps output from this? Obviously I’m doing something dumb (and I can always use ps2pdf to convert, just want to know what I might be missing!)
Excellent! works great. Thank for the tips.
how can I apply this instruction for Ubuntu 8.10?
@Levani
Same procedure should work for ubuntu 8.10
It doesn’t work 😐
I was able to make it work with the following instructions: “Right after installing cups-pdf on intrepid, it’s not possible to print a document in PDF unless you create the /home/user/PDF folder, or if you launch sudo aa-complain cupsd”
Hi, your post is little bit misleading. You realy don’t have to mess with cups backend rights.
Simple way how to enable pdf printer in Ubuntu 8.10 is:
#install cups-pdf
sudo apt-get install cups-pdf
# change target dir in cups-pdf.conf (line begins with Out …)
# !!! ANYONE must be able to write to target dir, so cups-pdf, can print there !!!
sudo nano /etc/cups/cups-pdf.conf
# anyone can read and delete printed PDFs!
Out /var/spool/cups-pdf/ANONYMOUS
# restart cups (don’t know if this is necessary)
sudo /etc/init.d/cups restart
# your printed PDFs will be in folder
/var/spool/cups-pdf/ANONYMOUS
Actually, all I had to do was install cups-pdf (sudo apt-get install cups-pdf) and then create a folder called PDF in the home directory. I then gave that folder write permission to Owner, Group, and Others.
Without creating that folder, printing would fail.
I am not sure if I needed to give those permissions to it. I only did so because of this comment from Lex (above): “ANYONE must be able to write to target dir, so cups-pdf, can print there !!!”
This was all on Ubuntu 8.10
On Xubuntu 9.04 i386 is too only required to create “PDF” folder in home directory.
Thanx
Ja, thanx Jonathan. Im newly converted to Linux. But even the latest Ubuntu version makes you THINK! Anyway it’s the best distro Ive used so far
For those that would like to customize cups-pdf you could go to this link: http://www.debianadmin.com/howto-install-and-customize-cups-pdf-in-debian.html
also try to modify the post-script
should it not be sudo chmod +x /usr/…..
Decent way (in Jaunty) is to correct your folder permission:
$ chmod -v go+x PDF
(^might be also needed to your user’s home folder)
This way you will avoid security risks mentioned in:
https://bugs.launchpad.net/ubuntu/+source/cups-pdf/+bug/295536/comments/65
Nice hint,
under Lucid Lynx I just had to install the cups-pdf package and create the PDF folder.
Messing around with the Permissions was not required. In fact it renders the PDF printer useless.
/var/log/cups/error_log:
Unable to execute /usr/lib/cups/backend/cups-pdf: insecure file permissions
Is there anyway to make the PDFs searchable using cups-pdf? I can’t even copy any of the text within the pdf file.
hi.
how to convert word to pdf?