How to batch convert DOC to PDF?

Dear list members, is there a way now under Mac OS X 10.12.1 to batch convert DOC or DOCX files to PDF? As I need to do this kind of conversion on a regular basis for several files, it is very time consuming to do it in Word for each file separately. I found some similar threads here in the forum, but the proposed solutions are outdated and so do not work anymore. Thank you!

iMac (Retina 5K, 27-inch, Late 2015), OS X El Capitan (10.11.4)

Posted on Feb 1, 2017 3:29 AM

Reply
23 replies

Feb 2, 2017 11:32 AM in response to VikingOSX

VikingOSX wrote:


Looks like a project for you. 😉


I actually went ahead, downloaded LibreOffice, and tried it 😎

I got the same result you did - the output went into the home folder.

Easy to fix!


Use --outdir to specify the same directory the file came from:


Replace


${CMD} ${ARGS} "${file}" >& /dev/null


with


dir=`dirname "${file}"`

${CMD} ${ARGS} "${file}" --outdir "${dir}" >& /dev/null



works like a charm! 😉

Feb 2, 2017 2:06 PM in response to Luis Sequeira1

If you add this additional Bash function to the script, and then at the end of the script, call it as shown with the filecount argument, a notification panel will slide in with the filecount when processing is complete.


Notification () {
$(osascript <<-AppleScript
use scripting additions
    return  display notification "Processed files: " & $1 with title "Word to PDF Conversion Tool" subtitle "Processing Complete"
AppleScript)
}


Notification $filecount

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to batch convert DOC to PDF?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.