Sept. 17, 2010, 8:46 a.m.
posted by void
Make Your Own PDFs
Are you used to using the "Print to PDF" feature in Adobe Acrobat? Here's how you can make your own PDF files using a similar technique. A very handy feature that's included in the Mac OS X operating system is the ability to "print" a PDF file from any application. Windows can also do this, via Adobe Acrobat. However, with the addition of a single package and a little bit of tweaking, you can get the same capability for free on Ubuntu Linux. Installing CUPS-PDFThe key to getting PDF printing enabled is in the package cups-pdf, which is in the universe repository [Hack #60]. Use apt-get from a terminal window to install the cups-pdf package: bill@lexington:~$ sudo apt-get install cups-pdf Password: Reading package lists... Done Building dependency tree... Done The following NEW packages will be installed cups-pdf 0 upgraded, 1 newly installed, 0 to remove and 34 not upgraded. Need to get 23.4kB of archives. After unpacking 147kB of additional disk space will be used. Get: 1 http://us.archive.ubuntu.com dapper/universe cups-pdf 2.0.3-1 [23.4kB] Fetched 23.4kB in 0s (31.2kB/s) Selecting previously deselected package cups-pdf. (Reading database ... 105713 files and directories currently installed.) Unpacking cups-pdf (from .../cups-pdf_2.0.3-1_i386.deb) ... Setting up cups-pdf (2.0.3-1) ... * Stopping Common Unix Printing System: cupsd [ ok ] * Starting Common Unix Printing System: cupsd ...done. After the installation of cups-pdf is complete, the CUPS configuration file requires a small edit to enable PDF printing. From a terminal window, run: bill@lexington:~$ sudo gedit /etc/cups/cupsd.conf
Find the line that says RunAsUser Yes and change it to RunAsUser No, and then save the file and exit gedit. Next, you'll need to restart CUPS to make the configuration change effective: bill@lexington:~$ sudo /etc/init.d/cupsys restart * Stopping Common Unix Printing System: cupsd [ ok ] * Starting Common Unix Printing System: cupsd ...done. Configuring CUPS for the PDF PrinterNow you must tell CUPS to use the newly installed cups-pdf package. Click on the System menu; select Administration and then Printing. Double-click on New Printer to start the "Add a Printer" wizard. Ensure that Local Printer is selected under the printer type and that "Use a Detected Printer" is selected, with PDF Printer highlighted in the list below (see Figure). Click on Forward to proceed. Adding the PDF printer
On the next screen, select Generic under the Manufacturer field (see Figure). Pull down the Model pull-down and select "postscript color printer." Click on Apply to commit the changes. Specifying the PostScript driver
Using Your New PDF PrinterUsing the new PDF printer is simple: from any application, use that application's native printing facility and select "postscript-color-printer" as your printer. The printer driver will automatically create a PDF and put it in a PDF subdirectory within your home directory. The filename will probably be something like job_1-untitled_document.pdf. That's it, it's just that easy! Who needs Acrobat? |
- Comment