How can I import high-quality (ie vector) PDFs into Microsoft Word for OS X?
February 23, 2007 12:36 PM   Subscribe

Why does Microsoft Word (OS X v.11) hate PDFs? Or: Please help me make this stats assignment just a little less frustrating.

One of the (many!) advantages of R is that it produces crisp and clean plots, exporting them as vector (ie PDF) files. Great.

However, when I add them to my DOC file (using "Insert > Picture > From file...") the resulting object in the text is a low resolution picture (possibly a rendered GIF or JPG.) Ugly (and, in complex plots, nearly unusable.)

How can I get Word to insert the proper high-quality PDF? I've hunted around the web and Word and found nothing (ie neither "Insert > File..." nor "Insert > Object..." results in success.) I suppose I could render the PDFs (ie through Photoshop) into something high-quality, but that seems excessive (and would be a pain); nor do I want to layout this multi-page assignment in InDesign (or some version of TeX!)

posted by docgonzo to Computers & Internet (16 answers total) 2 users marked this as a favorite
I've found in the past that Visio drawings pasted into Word look horrible, but turn out smooth and anti-aliased in the printed copy, so it's just a display thing. Have you tried printing the document?

Also, if printing results in OK quality, perhaps 'printing' to PDF (e.g. with pdf995) will look good?
posted by matthewr at 12:48 PM on February 23, 2007

Response by poster: That's what I thought, matthewr -- but the printed DOC looks even worse, all grey and fuzzy. Gah.

Insert rant about how MS manages to screw up PDFs even though they're the basic display language in OS X...
posted by docgonzo at 1:01 PM on February 23, 2007

I don't know what the program R does so this advice might be useless.

You could try a program called File Juicer to pull the images out of the PDF file. Maybe that will help when you import them into Word.

But if the printed images look bad, you might be out of luck.
posted by Cog at 1:13 PM on February 23, 2007

I have found this method to be very helpful. Open the PDF in Acrobat Reader. Choose the "snapshot" tool. It's just like cropping a photo. You start at one corner of the PDF image that you want to insert and you highlight the relevant portion. As soon as you let go of the mouse button, a snapshot is taken (as a JPEG, I believe) and stored on the clipboard.
Now go to where you want to insert the graphic in Word and paste it there. You can resize it if you need to.

If you want it to be really clear, make sure that you zoom in on the PDF when you're in Acrobat and take the snapshot when the image is really big. That way, it won't be grainy when you paste it into Word and resize it. If you zoom all the way out, it's going to be grainy if try to increase the size of the image once it's in Word.

Hope that made sense and that it's useful. I know it's not exactly what you are looking for, but maybe you can use this trick until someone else tells you how to actually insert the PDF itself.
posted by HotPatatta at 1:18 PM on February 23, 2007

Have you tried using Grab to capture a shot of the chart you need, and then converting it to a JPEG and inserting it?
posted by roofus at 1:21 PM on February 23, 2007

On preview....the screenshot from within Reader might be a better option.
posted by roofus at 1:21 PM on February 23, 2007

Further regarding copying images out of a PDF in Acrobat, I found that, perversely, the resolution of the copy depends on the zoom level when you copy it.
posted by exogenous at 1:32 PM on February 23, 2007

I may be wrong, but I don't think there is a way to get Word to handle vector graphics properly. My experience in Powerpoint is that eps files can be imported, but that only the tiff preview of the eps is displayed, if it is was saved with one included. Contrary to your experience, however, I've found that printing out ppt slides with epses on them restores the drawings to their glory. So I'd say you're probably stuck with whatever rasterized preview you're getting already, if you want to just import as pdf.

And thus your best option would probably be to create your own raster image of the pdfs, and the method outlined by HotPatatta is a good way to do that. IIRC, the Acrobat snapshot tool creates tiff images of what you select. That is why it is important to do as others have said and zoom in so that the region of interest is rendered with as many pixels as possible before you take the snapshot.
posted by epugachev at 1:44 PM on February 23, 2007

You could also switch to the Pages program in the iWork "suite," which most likely does do The Right Thing with pdfs. (I know that Keynote does vector graphics right, so I would imagine Pages does too.) I think iWork was only $50 when I got from our campus store.
posted by epugachev at 1:48 PM on February 23, 2007

I suppose I could render the PDFs (ie through Photoshop) into something high-quality, but that seems excessive (and would be a pain)

Keep in mind that Photoshop has pretty great batch processing tools. You could record the actions you do on one PDF and then just run the action automagically over a whole set of files in one fell swoop. Might be something to try if better ideas don't turn up.
posted by bcwinters at 1:54 PM on February 23, 2007

You could also open the pdf in Preview and then use the save as dialog to save it as a tiff or jpg or whatever format word likes best. You may want to play around a bit to get the best results.

Unfortunately, word (the entire office suite, iirc) does not handle vector images well. Your best option is to convert them to a raster format yourself instead of word doing it for you automagically.
posted by hariya at 3:39 PM on February 23, 2007

i've had this problem a lot. you could use grab to do a screen grab, but that limits the resolution to whatever size it is on your screen.

i've found that opening the PDF in preview, and just selecting an area and copy-pasting into word seems to work well. for whatever reason, when you copy-paste from preview you get some ridiculously high resolution in your word doc, which should preserve your nice sharp lines.
posted by sergeant sandwich at 4:21 PM on February 23, 2007

Looking into this: Word for OS X doesn't like PDF or EPS. Your best bet appears to be converting from pdf to png or tiff using photoshop. However, it should be trivial to create a macro to do it for you.

If you don't like photoshop. You might try ImageMagic command-line tools. I had good results with:

convert -density 300x300 Rplot.eps Rplot.tiff.

The -density flag says that the tiff image output should be 300x300dpi. By default, R sizes graphs at 5x5inches, so that will give you 1500x1500 pixels to play with.

(Spends too much time addressing this problem.)

The two recommended methods on the R-SIG-Mac mailing list are "don't use MS Word," and sergeant sandwich's copy and paste method. I fiddled around with R's internal PNG drivers, but they scale filesizes badly.

So, to make a long story short, pick one of the three options:
1: Don't use Word.
2: Convert pdf to png using Photoshop, ImageMagick or Preview.
3: Copy and paste from Preview to Word.
posted by KirkJobSluder at 7:57 PM on February 23, 2007

Or you can copy and paste from the R graphics window into Word. That dithers and resizes as well, but it's worth a shot. The R graphics window doesn't have selection tools, but if you click on the plot window, and then select Edit->Copy you can paste into other programs.
posted by KirkJobSluder at 8:01 PM on February 23, 2007

About the only vector-ish file format that Word actually likes is that hideous WMF format. But, unless "R" actually can export to WMF, you're out-of-luck on that one.
posted by Thorzdad at 8:00 AM on February 24, 2007

Response by poster: Thank you all for the v. helpful and thoughtful responses.

After some playing around with alot of the suggestions, I picked what was behind KirkJobSluder's Door #1: I downloaded LaTeX and am using that. Not ideal, but it's working...
posted by docgonzo at 10:30 PM on February 24, 2007

« Older Can I talk on my cell phone through my Mac using...   |   I'm your head, messing with your speling! Newer »
This thread is closed to new comments.