How to Convert Excel Files to Rasterized PDFs in Power Automate

Cloudmersive
5 min readJan 15, 2025

--

Rasterized PDFs are (bitmap) image-based documents, rather than the text- or vector-based PDFs we typically create when we export content to PDF format.

Among many benefits it offers, PDF rasterization secures our content by making it difficult to copy assets without the use of OCR services.

Convert Excel to PDF & rasterize in Power Automate

Converting any content to a rasterized PDF document is typically a two-step process — but we can boil that down to one step by creating a reusable Power Automate flow with Cloudmersive connectors.

We’ll walk through an example of this now.

In a quick Instant cloud flow, we’ll convert a folder full of example Excel documents to PDFs using a Cloudmersive Document Conversion connector action, and we’ll subsequently rasterize those PDFs with a Cloudmersive PDF connector action.

Add the List folder action to enumerate file Ids in a SharePoint folder

We’ll begin by adding the List folder action (SharePoint connector) to our flow. This action retrieves information about the files contained in a particular folder, including the File identifier (Id), which we’ll use in a subsequent action.

Retrieve file bytes with a Get file content action

Next, well add a Get file content action into our flow. We’ll use the file Id value from our List folder action to retrieve file bytes for each file stored in our target folder.

We’ll notice Power Automate has placed our Get file content action in a For each control. That’s because the Id value is an array; the rest of our flow will now filter through a series of repeat-processes.

Convert Excel to text-based PDF

Within the For each control, we’ll now add our initial PDF conversion action.

To find this action, we’ll first type “Cloudmersive” into the connector search bar, and we’ll then navigate down to the Cloudmersive Document Conversion connector.

To view the entire actions list, we’ll click on the blue “See more” link to the right of the connector name.

This action has dozens of unique document conversion actions; to find the action we need quickly, we can simply CTRL+F search “Convert Excel XLSX Spreadsheet to PDF”.

Create a Cloudmersive connection with a free API key

Once we select this action, we’ll need to create our Cloudmersive Document Conversion connection. We can do that by obtaining a free API key on the Cloudmersive website (these allow a limit of 800 API calls/month and no commitments) and pasting that into the API Key field. For reference, I’m using a free API key in this walkthrough.

After we’ve successfully created our connection, we’ll configure our initial PDF conversion request with file bytes from our Get file content step. In the (file name) parameter, we’ll pass the DisplayName value from our List folder step.

Rasterize the text-based PDF contents

Below our initial PDF conversion action, we’ll now add our PDF rasterization action.

To find it, we’ll search “Cloudmersive” once again, and this time we’ll locate for the Cloudmersive PDF connector.

We may see the Rasterize a PDF to an image-based PDF action in the actions list preview, as shown in the example above.

If we don’t see that right away, we’ll click “See more” (as we did earlier) to view the actions list, and we’ll find this action just over halfway down the page.

After we select this action, we’ll once again create a connection using our free Cloudmersive API key.

We’ll then pass OutputContent from our Excel to PDF conversion action into this action’s Input file parameter, and we’ll then add any name we want in the (file name) parameter.

Create the rasterized PDF file in SharePoint

At this point, we’ve successfully created a rasterized PDF of our original Excel content.

To wrap up our flow, we’ll add a Create file action that saves our rasterized PDFs in another SharePoint folder. We can dynamically name these raster PDFs using the Name value from the List folder action (don’t forget to add a .pdf extension after).

We’ll now save our flow and click “test” to run it.

When our flow finishes running, we’ll find the rasterized PDF versions of our Excel documents in our target SharePoint folder.

Conclusion

In this walkthrough, we learned how to convert an entire folder full of Excel documents into rasterized PDF documents using a combination of SharePoint and Cloudmersive connector actions.

We can use this same flow logic (with different Cloudmersive Document Conversion actions) to create rasterized PDF versions of many common file types — including Word (DOCX), PowerPoint (PPTX), PNG, JPG, and more.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet