I'm using Acrobat Pro XI on Windows. I cannot use any kind of cloud solutions due to strict security restrictions from my employer.
Thanks in advance.
NVM. Found my answer. For those who also need it here it is:
var oProfile = Preflight.getProfileByName("Flatten annotations and form fields")
var oThermometer = app.thermometer;
var myPreflightResult = this.preflight(oProfile, false, oThermometer);
There's a much easier way:
Thank you. That works too.