A guide to using PDFs on GNU/Linux
Although GNU/Linux has long supported postscript format, full support for the related PDF file format has been longer in arriving. Today, however, PDF support is finally starting to equal what is available on other operating systems. Whether you are printing, editing, or viewing PDF files, you now have the choice of a variety of applications on both the command line and the desktops.
What follows is not an exhaustive list of choices, but a survey of the main tools available. Taken together, they should be enough to fill most of your PDF needs.
Printing to PDF
GNU/Linux offers several options for producing .PDF files. At the command line, you can use ps2pdf, a script that comes bundled with Ghostscript. As its name suggests, ps2pdf converts postscript files to .PDF format. You can convert a file to postscript within any application by setting up a postscript printer to print to file (you don't actually need the physical printer). From there, all you need is to enter the command
ps2pdf <input.ps> <output.pdf>. If you don't want to change the path or name of the output file, you can omit it altogether to produce a file that has the same name as the postscript input file, but with a .pdf extension.
On the desktop, you can use Print to File (PDF) for KDE-aware applications like KWord, selecting it as a printer from within the application. A more universally useful solution is the CUPS-PDF driver, which you can set up as a CUPS printer. For CUPS-PDF, use the device URI of
cups-pdf:/, and select Generic from the list of manufacturers and Postscript from the list of models. All output from CUPS-PDF is to a sub-folder of your home directory with the same name as the printer you set up.
However, all three of these solutions fall far short of the full functionality available for other operating systems.If you want more control over the PDF files you produce, a better choice is OpenOffice.org's File -> Export to PDF, especially when the extendedPDF add-on is installed. This option gives you control over image compression, bookmarks, forms, the default view, and security options -- just about everything except font embedding, which is enabled by default (an option that simplifies the sharing of files between different computing systems). The main drawback is that the combination produces PDF files that are, on average, about one-third larger than those produced by CUPS-PDF. Otherwise, the degree of control it allows should make it the preferred method of PDF production.
When you have an existing PDF file that you need to edit, the quickest solution on any platform is to make your changes in the source file and produce a new file. However, if you don't have the source file, you have at least two options.
From the command line, pdftk offers a variety of functions. Using pdftk, you can split, merge, decrypt, encrypt PDF files, as well as fill out forms, rotate pages, add watermarks, or edit metadata. In some cases, you can even repair a corrupted file. The one drawback to pdftk is that it involves editing in text mode what is basically a graphical document. For this reason, editing with pdftk can often be a challenge, even if you have a copy of the file that you are editing open in a viewer.
For many, a more practical solution is PDFedit. Although still in early development, PDFedit has many of the functions of pdftk. Even more importantly, it allows you to edit individual characters. This ability is painfully slow, and limited to a buffer of about fifty characters. Nor is it up to editing more than a line at a time, which would require massive reformatting of the document. Still, Adobe Acrobat itself offers no better character editing of PDFs, and, even in its current release, PDFedit is a welcome addition to the PDF tool kit. Between it and pdftk, GNU/Linux users should be able to achieve approximate parity with users of other operating systems, at least in terms of functionality -- convenience,unfortunately, remains elusive.
PDF viewers are easier to implement than PDF generators or editors, so GNU/Linux has a number of them. For those with no objections to use non-free software, Adobe has released Adobe Acrobat Reader for Linux 7.0, which is on a par with its readers for other operating systems, and allows viewers to see both bookmarks and metadata.
The available free viewers are a mixed lot. Both gv and xpdf display the pages of a PDF document, and include the standard options for changing the magnification and for navigating documents. However, neither shows thumbnails, bookmarks, or metadata. Since both GNOME's Evince and KDE's KPDF can display all three, either one of them is generally a better choice for a free view -- about nine times out of ten. However, every now and then, gv or xpdf manages to read PDF files that Evince or KDPF cannot. Whatever the reason for this difference in functionality, it means that you should at least keep the full range of choices in the back of your mind, even if you do not want to install every free viewer on the off-chance that you need it.
PDF support on GNU/Linux still has some gaps. Still, it has improved immensely from even a few years ago, until today it is rapidly approaching the functionality found on other platforms. Most of the time, the challenge now is not finding the tools you need so much as switching between a variety of shell and desktop interfaces in your search. A single suite of programs like Adobe Acrobat with a more or less common interface would improve the situation immensely for the average user.
However, that is a challenge for another day. For now, what matters is that, with a little bit of flexibility and ingenuity, you can consider one of the long-standing gaps in GNU/Linux functionality close to be bridged.
Bruce Byfield is a computer journalist who writes regularly for NewsForge, Linux.com, and IT Manager's Journal.
Bruce Byfield (nanday)
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide