Here is a small Mac OS X Application built with Apple's Automator and Python. I use it to incorporate all or part of a
It's function is to replace all fonts in the PDF file with outlined paths, to prevent Illustrator from issuing warnings about missing fonts and garbling the original text in the process. If the image on the right looks familiar to you, then this page may be what you need.
The original version of this Application dates back to a discussion on the OS X TeX mailing list in 2005. There is some more discussion of these font-related issues on the Illustrator page linked here.
FontBegone is a utility that can be run either by dragging files onto its icon, or by simply tapping its icon while a PDF is on the
Pasteboard of your computer.
Whatever document you feed into
FontBegone will then be processed by invoking
ghostscript. All text will be replaced by outlined paths (i.e., graphics objects) so that the shapes of the original characters stay exactly the same, instead of being replaced by substitute fonts.
The advantage of this is that you can then edit the outlined paths using all of Illustrator's drawing tools. The downside is that Illustrator's
Text tools don't apply to the outlined paths: you no longer have text, but graphics to edit.
You need to have
ghostscript, in particular the
ps2pdf commands, installed on your computer. These commands will automatically be installed if you have the
MacTeX distribution. Alternatively, you can also install
ghostscript from Fink or MacPorts (
ps2pdf is part of that package).
Also, the latest version is written using
Automator, so it will only work in
OS X 10.6 (Snow Leopard) or later.
unzipthe file (by double-clicking on
Applicationsfolder (or anywhere you prefer).
FontBegoneapplication to the toolbar of my Finder windows, see this screenshot (FontBegone is not the only home-made utility I've placed there, as you can tell by the weird-looking icons):
There are two ways of using
FontBegonewill have created a new file for each input file, differing in filename by the addition of "-nofont.pdf". So an input file "paper.pdf" will be converted to "paper-nofont.pdf" in the same directory. These output files will usually be larger than the input files. That shouldn't be too surprising, given the fact that each character of text is now drawn as a little picture!
FontBeGonedoesn't just convert entire files, but also PDF images copied from arbitrary sources. For example, use the
Select Toolof your favorite
copyit to the
Pasteboard. Before attempting to paste into Illustrator, just
tap the iconof
FontBegoneto activate the application (a single click is enough if you have the icon in the Finder toolbar or on the Dock). Again you will see a spinning gear in the menu bar until the conversion has finished. Now the converted PDF will be on the
Pasteboardand you can insert it into Illustrator without the dreaded font warnings. With this approach, you only need a single click between copying and pasting a
FontBegonewhich don't allow conversion on the
ps2pdf. These must be installed, otherwise FontBegone will exit without doing anything.
PATHvariable must be set correctly.
ps2pdffrom the command line. If you can't, then your PATH variable isn't set up correctly, and you have to consult the instructions for your specific TeX installation on how to fix this.
defaults write ~/.MacOSX/environment PATH $PATH
environment.plistinside the folder .MacOSX. The purpose is to take the PATH variable created by your own shell initialization and deposit it in the .plist file. In my case it contains the following (this depends on your shell variable
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PATH</key> <string>/sw/bin:/sw/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin</string> </dict> </plist>
<string>tags, the directories to be searched for shell executables are listed, separated by colons. You may have to customize this list to make sure it includes the path to your
environment.plist: this file is intended to keep all OSX applications on the same page with respect to the underlying UNIX shell environment, thus maintaining a coherent integration of low-and high level functions in OSX. The
defaultscommand overwrites any setting for
PATHthat may have existed previously in that plist file. This should not be a problem if you have a properly initialized command line shell, because that initialization in turn would have included reading
environment.plist, and then prepending or appending some entries to the PATH variables. So you should not end up losing anything that was there before in your
environment.plist. However, if you aren't sure that your initialization is sane, just make a backup copy of
environment.plistbefore executing the
defaultscommand. The worst thing that can happen with the above
defaultscommand is that some directories will occur in duplicate in your PATH, but that's completely harmless.
#!/bin/sh gs -sDEVICE=pswrite -dNOCACHE -sOutputFile=- -q -dbatch -dNOPAUSE -dQUIET "$1" -c quit | ps2pdf - "`echo $1 | cut -f1 -d'.'`"-nofont.pdf
There is a reason why I don't have ghostscript write PDF output directly: the
NOCACHE doesn't work directly with the PDF device.