Flatten a PDF Form with Power Automate

September 24th 2021

Many of our customers use the ‘Fill a PDF Form‘ action to add data to en existing PDF Form document, please refer to this post to discover more about the action: Fill a PDF Form with Microsoft Power Automate

We’ve had several customers recently ask how to stop onward editing of a PDF Form, or how to ‘flatten’ a PDF form creating a flat PDF rendition of the PDF Form. Lets review how to ‘Flatten’ a PDF Form in the first instance and secondly an alternative approach to stop PDF Form editing using the ‘Secure PDF Document‘ action.

Consider this flow which is configured to automatically extract a ‘Holiday Request Form’ from a new email, extract the data contained within the PDF Form (using the Encodian Get PDF Form Data action) before uploading the ‘Holiday Request Form’ to SharePoint and setting its metadata with the values extracted from the form:

The following screen shot depicts a processed PDF Form stored within a SharePoint library:

Now, arguably we could set permissions on the file in SharePoint to prevent editing but this does not detract from the fact the PDF Form is still editable. Flattening the PDF Form is very simple, just add the ‘Convert to PDF‘ action which will automatically detect that the file is a PDF form before creating a ‘flattened’ PDF rendition of the form, see below:

The file uploaded to SharePoint is now a flattened PDF rendition of the original PDF Form.

Secure a PDF Form with Power Automate

As opposed to flattening the PDF Form it is also possible to prevent PDF Form editing by password protecting the file using the ‘Secure PDF Document‘ action, as illustrated below:

In this example I have left a blank password for ‘View Password’ thus a password prompt will only appear when an attempt is made to edit the PDF Form.

Finally…

Hopefully, this post provides a good guide to flattening and protecting PDF Forms using the Encodian ‘Convert to PDF‘ action and ‘Secure PDF Document‘ action, please share any feedback or comments – all are welcome!

Author
Jay Goodison

Managing Director

You might also be interested in...