AppleScript is a scripting language allows the user to directly control scriptable Macintosh applications. In this post, I will show you a trick to co
AppleScript is a scripting language allows the user to directly control scriptable Macintosh applications. In this post, I will show you a trick to convert Word and Pages docs to PDF in batch mode with simple Applescript codes.
How to batch convert Word files to PDF with Applescript.
As we all know, Pages is designed to edit documents on Mac. As a professional word processor, it supports opening Word files including .doc and .docx. Meanwhile, it could export documents to PDF format. Based on the theory, we can call Pages to help us convert Word files to PDF in batch mode. It will save you time especially when you have a large folder of Word documents to be converted into PDF.
You can free download Word-to-PDF conversion script here.
Open BatchWordtoPDF.scpt. You will see the codes in Script Editor. Click the “Run” button and choose the desired Word files. Then, this script will start the conversion process automatically.
Thanks for the code writer Vochoajr from Github.
However, this code only supports doc-to-pdf conversion and has some issues when selecting docx files. I have contacted the contributor to provide an ultimate solution.
How to batch convert Pages files to PDF with Applescript.
Files in pages format are widely used by Mac users. This format is perfectly compatible with Mac OS but unaccessible on Windows system. Therefore, PDF format has become the best choice to share documents between Mac OS and Windows System. The purpose of this AppleScript file is to help users batch convert pages to PDF with only one click.
You can free download Pages-to-PDF conversion script here.
Open BatchPagesToPDF.scpt. You will see the codes in Script Editor. Define the original folder where you place pages files and the destination folder where you want to export the PDF files to.
Then, click the “Run” button and this script will read your pages in the original folder automatically and save them as PDF in the destination folder.
After reading this post, you will know a cool method to convert your multiple Word files and Pages doc into PDF. No need to pay for third-party Apps anymore and just use these simple codes to replace your laborious and repetitive opening-exporting action for each document.