Automator/applescript to batch open PDFs in Preview and Export as PDF
I am batch generating PDF files from Filemaker Pro 14. The resulting PDFs open fine in Preview, but not with Acrobat Reader/Pro (1 or more blank pages and an error "An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem."). This is a Filemaker bug (http://forums.filemaker.com/posts/43f4da4247). Unfortunately, my end users don't use Macs or Preview, so the files need to behave properly with Acrobat.
I have discovered that one way round this problem is to open each PDF in Preview, then "Export as PDF" with the same file name to overwrite original file. The files so generated can be opened without error messages in Acrobat. As I may be generating several hundred PDFs at a time this way, I'm looking for a way to automate the opening of the PDFs and Export as PDF by Preview. I have perused the discussion groups a little, and tried a few things with Automator/Applescript, but I have very little experience with these tools. The resulting converted files could either replace the originals or populate another folder so the originals are preserved. Can anyone help?
Much appreciated.
Mac 10.10.5
Preview 8.0
Filemaker Pro Advanced 14
iMac (Retina 5K, 27-inch, Late 2014), OS X Yosemite (10.10.5)