How to write a text file in Acrobat Javascript

后端 未结 3 545
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 13:22

I am using acrobat XI I have tried output a text file like this

var cMyC = \"abc\";
var doc = this.createDataObject({cName: \"test.txt\", cValue: cMyC});
this.e         


        
3条回答
  •  鱼传尺愫
    2021-02-04 13:25

    Impossible. For security reasons, saving a file automatically is not allowed.

    As stated in the SDK:

    Beginning with Acrobat 6.0, if the parameter cDIPath is non-null, a NotAllowedError  exception is thrown and the method fails.
    If cDIPath is not passed to this method, a file selection dialog box opens to allow the user to select a save path for the embedded data object.
    

提交回复
热议问题