In their ancient wisdom, the Romans were fond of reminding themselves that, while the spoken word is ephemeral, its written counterpart lasts forever. In the modern world, however, putting pen—or printer—to paper may no longer be the best way of preserving a document for all eternity. Today, having computers and the Internet at our disposal means that digital formats have replaced paper, papyrus, and stone tablets as our primary ways of storing and exchanging documents.
The most popular instrument used for this purpose is probably the Portable Document Format, which is known to most people simply by its initials, PDF. Developed by Adobe and introduced in 1993, the format is designed to allow any number of completely unrelated computers of any platform to display a document while preserving all of its typographical and layout information, including fonts and images. In principle, a PDF document should look and print exactly the same way on any computer, regardless of where it was created.
While Adobe still maintains the official PDF specification, the format itself is open and can be adopted by anyone without having to pay royalties. As a result, it is widely used across all platforms; in fact, Apple has built the ability to generate and manipulate PDF files directly into OS X’s Quartz framework, which has also made its way into the mobile iOS, thus making the format a first-class citizen for all Mac and iPhone/iPad users.
Printing to PDF
Because PDF support is built right into the operating system, OS X’s printing system gives applications the ability to “print” a file directly to PDF. In practice, this means that any application that supports printing is capable of generating a PDF file that can be saved, e-mailed, or faxed to a third party.
To take advantage of this feature, all you need to do is have your application print a document and then, instead of proceeding with the print operation, choose one of the options from the PDF menu. As you have probably already figured out, the Save as PDF command results in the document being “printed” to a PDF file that is stored in a location of your choosing, while the Mail PDF option generates the PDF file and then automatically attaches it to a new message inside Apple's Mail program.
The Save as PDF-X item may sound intimidating (it’s probably that extra X), but it only differs from the standard PDF generation option in that it creates a file based on a slightly different version of the output format mandated by the International Organization for Standardization and designed to facilitate the exchange of graphical documents. Because of the specialized applications for which it was conceived, PDF-X is much stricter than PDF, which can come in handy when you’re dealing with stubborn documents, as we’ll see later.
The actual contents of your PDF printing menu may include more or fewer items, as third-party applications are allowed to create their own special PDF generation workflows. In my case, for example, Apple's iLife has added the ability to send my PDF files to iPhoto, while a couple of additional applications have installed their own workflows. This option is open to you as well, as long as you are familiar with one of the scripting technologies available on OS X; in fact, Apple itself provides a handy reference on creating your own printing workflows using AppleScript, a UNIX shell script, or Automator.
Despite the extreme simplicity with which one can generate a PDF file from the Print menu, there are still plenty of opportunities for things to go wrong—typically, in one of three areas: file size, image quality, and text reproduction.
In the first case, you typically find that, when generating a PDF file, OS X attempts to provide the highest quality possible; this can sometimes result in very large files—great if you’re intent on reproducing a print document as faithfully as possible, but not so great if all you want to do is e-mail a simple file to someone or make the document available from a Web page.
Luckily, you can easily get around this problem by opening your PDF file in Preview and then selecting “Save As…” from the File menu. In the dialog box that appears, you can choose to run the PDF file through one of several Quartz Filters capable of some neat tricks, such as converting the file to black and white or giving it an old-fashioned sepia hue. Among these is Reduce File Size, which will perform a number of operations to reduce the size of the file. The size reduction can be quite dramatic, depending on the contents of the PDF document, but it usually comes at the expense of quality, particularly of images.
When good graphics go bad
Image quality is another common problem that PDF users face. There can be several causes, but it is usually due to the fact that PDF files can contain two kinds of graphics: vector and bitmap. The former are defined using a series of mathematical equations of varying complexity and, therefore, can look good at any resolution.
Bitmaps, which includes most pictures, are comprised of a finite number of pixels. This means that their visual quality will depend on the resolution at which they are rendered: what looks good at a low level of detail—such as when looking at a document at 100 percent zoom—may not be quite as appealing when you start zooming in further.
Unfortunately, there is precious little that can be done about this problem. OS X already renders your PDF files at the full resolution supported by each application; therefore, assuming that you didn’t use the trick above to shrink the size of your output, the quality of bitmap images depends almost entirely upon the program that generates them.
That said, there are a couple of tricks you can use to improve the quality of pictures, particularly when working with software like word processors. The simplest is to try and use vector images whenever possible, as these will look good at any level of detail. For situations where bitmaps are unavoidable, try to use the resolution that best matches the final use of your documents. For example, PDF files destined for print should contain bitmaps that have a minimum resolution of 300 dots per inch (dpi); therefore, an image that will be three inches wide and two inches tall on paper should be at least 900-by-600 pixels to print well.
What about fonts?
Text is stored inside a PDF file using two pieces of information: the characters and the font. One of the format’s key features is the ability to embed a font directly inside a PDF file; this, in turn, makes it possible to accurately render a document's fonts on computers where the font is not installed.
Thus, if text in a PDF file looks blurry and pixelated, or otherwise fails to render correctly, the culprit is almost certainly the absence of embedded fonts. The good news here is that, if you created the document or if you have all the necessary fonts installed on your computer (in which case the file should render properly even without embedded fonts), this kind of problem is relatively simple to remedy.
By default, OS X does a very good job of embedding fonts in the documents it generates; therefore, if you created yours using one of the operating system’s standard functions, such as print-to-PDF discussed above, it’s unlikely that you will have font problems.
In documents for which you have the fonts installed—but they originated from a third party—there is a simple trick that will embed the fonts automatically: just load the file using Preview, then save a copy and make sure to select the Create Generic PDFX-3 Document Quartz filter. Because one of the key requirements of PDF-X is that all fonts be embedded, doing this will give you a document that renders properly on all computers.
Alternatively, you can re-print your file into a new PDF document (note that this will not work from within Adobe’s Acrobat applications, which block Apple's print-to-PDF functionality, but will work fine from Preview). In this case, however, you may lose some of the meta-information stored in the PDF file, such as bookmarks or links.
At this point, given the number of things that can go wrong, you may be starting to wonder whether the Romans had it easy with their stone tablets and vellum paper. On the other hand, e-mailing a stone tablet is infinitely more challenging than attaching a PDF file to a message. Hopefully, the simple tricks outlined above will help you solve any other issues you may have and inspire you to put that hammer and chisel away for good.
[Frequent Macworld contributor Marco Tabini is a Web specialist based in Toronto.]