Convert DOCX to PDF in Power Automate

This article demonstrates how to convert DOCX Word document to PDF and receive a pixel-perfect output as a result of this conversion in Power Automate (Microsoft Flow).

You can use the pre-built Flow templates or follow the steps outlined in the article to create your Flow from scratch.

Preparation

We will take a hiring contract as a sample Word document:

Word sample for pixel perfect conversion

Use this link to download it.

Our document has to be stored somewhere. Power Automate (Microsoft Flow) has a lot of connectors for different systems. Here are just a few of them:

  • SharePoint

  • Salesforce

  • Box

  • OneDrive

  • Google Drive

  • Dropbox

  • SFTP

  • File System

You can store your source file anywhere. In this example, we will store our document in SharePoint. Our Flow will get a file from a SharePoint document library, convert it to PDF and store generated file back to SharePoint document library.

Setting up the Flow

This is how complete flow looks:

pixel perfect MS Word to PDF conversion Flow

Here is step by step description for the flow.

Flow trigger

You can actually pick any trigger. For example, you can start Flow on file creation in a SharePoint document library. We use Manually trigger a flow trigger here to simplify the Flow.

Get file content

This action gets file content of the specified file from a SharePoint document library. You just specify SharePoint site URL and path to your file.

You can use any other connector to get files from your system.

Convert to PDF

This flexible action from the Plumsail Documents connector automatically detects and converts various file types – Word, Excel, PowerPoint, HTML, images, and more – into PDF. You don’t need to worry about checking the file formats and applying separate actions for each one – everything is handled seamlessly. Learn more about the Convert to PDF action and supported formats here.

If this is your first time using the Plumsail Documents connector, Power Automate will request a Connection name, an API key, and Data center location. You can type any name for the connection, for example Plumsail Documents (production key). Ensure that the selected data center location matches one of your account. Then, create an API key in your Plumsail Account, copy and paste it into the API key field, and click Create.

Create connection in Power Automate flow

Just put the DOCX file content from the output of the previous action and specify the filename. It will convert our Word document, and we’ll receive the pixel-perfect PDF output.

Create file

Now you need to store PDF file somewhere. In our example, we use Create file action from SharePoint connector to store the PDF document into SharePoint document library.

pixel perfect PDF result in OneDrive

You can use any other connector to store PDF document into your system.

Ready-to-use Flow templates

We have simplified the process of Flow configuration for you. Below is a clickable widget of the templates that you can start from: