Tips and Tricks

Convert DOCX to PDF Natively With A Right-Click

Microsoft Office for OS X is usually very sluggish and slow.  This is one reason I don’t like working with DOCs or DOCXs in OS X.  Yes, you can easily view the document using QuickLook (pressing the Space bar while the file is highlighted), but if you actually want to open the file and manipulate it, you need to either buy Office, or get an open source alternative.

Download a pre-built workflow (or create your own by following the steps below).

I hate waiting for Microsoft Word to load and open the documents so I made an Automator workflow that converts a Microsoft Word document into a PDF so I can easily get rid of the DOCX and enjoy using the better-performing Preview app.


The best part is that you don’t need to install an office suite or any other software.  The script runs as a service, so you can just right-click a DOCX and choose Convert to PDF.


  1. Open Automator
  2. Choose Servicechoose-service
  3. Click Choose
  4. Choose Files or folders and from the pulldown menus labeled Service receives selectedreceives-files
  5. Drag Get Specified Finder Items from the left pane into the right pane
  6. Drag Run Shell Script from the left pane into the right panerun-script
  7. Choose As Arguments from the pulldown menu labeled Pass Inputas-arguments
  8. Paste in the script below
  9. Choose File > Save
  10. Your workflow will now appear when right-clicking files

Please be aware that this workflow deletes the original DOCX.

42 replies on “Convert DOCX to PDF Natively With A Right-Click”

I just found out the hard way that it deletes the original file once it converts it to a PDF…

Is there any way this would work for pptx files as well?
I tried some solutions with a shell script but couldn’t get it to work. I guess it’s due to the new Office version.

I haven’t tried. I’m not sure how well a power point would convert into HTML, but you could try it and see. There might be some different options to do it if it doesn’t display properly.

using your script unfortunately just gives blank pages. Would be really nice to see if someone could make it to work with pptx as well. =)

I suppose very complex documents might have issues. Do you documents have tons of formatting/macros, etc?

It’s slideshows from my lectures, so I actually can’t control what will be in or not. There are no macros. I thought it’d be possible, because there were solutions with a different script for older Office versions. I guess they used the built in function, that came with the office suite.

Yeah, it may or may not work. The whole point of this trick is to convert Microsoft document without having to own Office or any of it’s AppleScript libraries and to turn it into something more usable.

Hi, can you please let me know how to delete the saved workflow? I clicked file save and think i labelled it DOCX to PDF but can not find it to delete it. Thanks

Is there a way to alter the AppleScript so that there can be a Service for converting Pages documents to PDFs? Or, how would you recommend creating a similar service designed for converting Pages instead of Word docs?

You could do it via AppleScript, but wouldn’t be as easy. DOCX to PDF works well since there is already a built in tool to do so. And AppleScript is probably the best way.

HI I am having trouble converting more than 1000 files at a time. When i highlight 1000 item the service to convert is still available but at 1001 files it is no longer available

Automator tends to have low limits like this. You can probably increase the limit by running the script via the command line, although it is a bit more tedious and difficult.

Many thanks for that. Been looking at a quick way of converting those pesky docx in pdf and you have the best solution so far. Many thanks.
Just need a way to stop it deleting the original files.

Maybe? I think the utilities used in the script don’t care about those. It might be worth investigating, but I don’t know off hand if it’s possible or not.

How can I alter this script to use LibreOffice command line options to convert DOCX to PDF? As it is, this script strips out images and formatting that I require in the PDF output. Opening the docx files in LibreOffice and exporting to PDF retains the formatting.

There might be a way to directly use the cupsfilter command, which is essential what printing to PDF does, but I used the intermediate step of converting it to HTML first, which is probably where you lose the formatting.

This script removes all docx formatting. Is there any way to keep the formatting (and comments etc.) and convert to pdf (so it looks exactly like when printed)? Thanks. VS

The command line utilities that handle the conversion are what do that. There might be something better out there then what I’ve put together.

THANKS SO MUCH for this (and the additional note in the replies about how to keep the original document). I’m a teacher and this just saved me loads of precious time!

Thanks again!

Hi again,

There are no files related to the service in that folder. Anywhere else I might find them?


What version of macOS are you on? Looks like they’ve changed things since I wrote the post.

Probably not easily. You can try converting it to just text without formatting first.

Jacob, I am so grateful for this. It worked fine for me and I found out how to modify so the formatting of the PDF such as the page borders looked better. But then I upgraded to Catalina and get this message: “The action “Run Shell Script” encountered an error: “cupsfilter: No filter to convert from text/html to application/pdf.””

Please advise.

As of 9 Jan 2020, using Mac OSCatalina, this utility removes your original file and replaces it with an empty ‘Zero bytes’ PDF. Luckily, I didn’t try it with anything important. May I assume that the OS utility you used no longer exists? Trying to learn AppleScript is going to take longer than doing each file one at a time on the word processor! No-one else appears to have a script that does this. BTW I’d really prefer to leave the original file intact. I’m archiving files on the assumption that PDFs may be more future proof than other document formats, but you never know.


I have the same situation. In OSX Catalina it leaves you with a PDF with 0kb file size. Such a shame as would be really useful! If anybody solves it, I’d be really grateful! I get sent so many docx files that I need to convert to PDF, despite me asking so many times for the senders to convert!

Leave a Reply