Acrobat Run profiles with variables(JavaScript)

28 Views Asked by At

a preflight created based on acrobat,How can I set a value to the preflight before running.

var oProfile = Preflight.getProfileByName("myPreflight");
var oThermometer = app.thermometer;
var textSize = 10;
//oProfile.SetVariable("textSize",textSize); how to do?
var myPreflightResult = this.preflight(oProfile,false,oThermometer );
1

There are 1 best solutions below

1
hasan darwish On

Try to make a timeout :

oProfile.SetVariable("textSize",textSize)
var result = undefined
var self = this // Not necessary, but to avoid problems

setTimeout(function(){
   result = self.preflight(oProfile,false,oThermometer)
}, 100) //The 100 is in 100ms , you can change it