Inserting vector graphics (like PDFs or PostScript) into MS Word for OS X.
I’m trying to do some secretarial work to help my wife turn in her dissertation. I created some spiffy illustrations in Inkscape but I was having a frustrating time inserting the graphic into her document. Microsoft Word wants to rasterize every imported PDF. The resultign graphics were fuzzy from all the anti-aliasing and resampling that was applied.
The Internet helped out a little bit with a discussion on Ask Metafilter: How can I import high-quality (ie vector) PDFs into Microsoft Word for OS X? Although it would be nice to go with KirkJobSluder’s suggestion #1 (”Don’t use Word.”) the dissertation is already written and it would be some effort to rewrite in a comprehensible system like LaTeX. The other suggestion (manually rasterizing to a huge file and importing that) also leads to inexplicably lousy results.
Enough preamble. Here’s the solution:
- Save the graphic as encapsulated PostScript. In Inkscape, use the print dialog, setting the printer as “
| cat > /tmp/$$.ps && ps2epsi /tmp/$$.ps filename.epsi && rm /tmp/$$.ps“ - Insert this graphic into the Word document. Even though ps2epsi generates a preview bitmap, Word will not show it, displaying just a box.
- Here’s the tricky part. You can’t just export PDF directly, or Word will use the ugly preview box.
- Print the Word document as “Save PDF as PostScript”. Word will see that the output format is PostScript and include the contents of the encapsulated PS file.
- Open the saved PostScript in Preview. Now you can print to PDF and get a reasonable result.
- Send a bill to Redmond for wasting a few more hours of your time.
If any reader has MetaFilter privileges, please leave a link to this article.
