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:

  1. 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
  2. Insert this graphic into the Word document. Even though ps2epsi generates a preview bitmap, Word will not show it, displaying just a box.
  3. Here’s the tricky part. You can’t just export PDF directly, or Word will use the ugly preview box.
  4. 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.
  5. Open the saved PostScript in Preview. Now you can print to PDF and get a reasonable result.
  6. 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.

2 Comments »

  1. Christian Cepel said,

    May 18, 2007 at 7:37 am

    Will word not import SVG?
    http://en.wikipedia.org/wiki/Svg

    Inkscape supports the format.
    MS Viseo can export to SVG & SVGc so Redmond is at least aware of the format… I’d be very much surprised if there wasn’t an OLE definition out there…somewhere.

  2. Iyad Obeid said,

    July 5, 2007 at 2:59 pm

    What a godsend. Thank you! Its a shame it takes so many steps but at least it works. Thanks.

RSS feed for comments on this post

Leave a Comment