Automate Save As PDF - From Finder


We deal with a lot of PDFs and often need to ‘flatten’ them. I’m sure you know this means to save as again as PDF, so that there is no history in the file.

At moment I open them in Preview and use the ⌘P ⌘P trick which I learned from Automators.

It would be great if I could run this from finder, ideally being able to select more than one PDF and it flattens them all.

The automation, should save the PDF, in the same file location with the same name, ideally without any further interaction, ie not needing to confirm replacing the existing file.

There is a quick action, called Create PDF which works for jpgs and other files, but not for PDFs.

I have Keyboard Maestro if that helps. Does anyone have any ideas on how to accomplish this?