Call validate function in pdf from external program using foxit phantomPDF

225 views Asked by At

I want to call my javascript function when arrive a call from an external program which is being write in my field into my pdf files. Is it possibile to do? i'm using foxit PhantomPDF.

1

There are 1 answers

0
joelgeraci On

Foxit PhantomPDF will run most field validation scripts that use JavaScript for Acrobat automatically when a field value is updated, the problem you are going to have is communicating the success or failure back to your external application. There's a lot of plumbing you need to get working between the viewer and the various host applications. I've found that a reliable way to accomplish the same thing is to first check the value of the field and save that into a variable, then update the field value, then check the field value again. If the field value was changed, the validation passed, if the value is the same as before the update, you know the validation failed.