0 Replies Latest reply on May 10, 2010 12:28 PM by Michal Wallace

    Extra Security Restrictions in Embedded PDF?

    Michal Wallace

      I am writing an AIR app that deals with local PDF files, and I would like to trigger a search of all files in a directory.


      I'm able to call search.query(needle, "Folder", "/c/haystack") and it works fine inside Acrobat.


      However, I can't get past the security checks when embedding the PDF inside AIR.


      I'm using a trusted function, created in my Acrobat 8.0/Acrobat/Javascripts directory:


      var trustedFolderSearch = app.trustedFunction(
         function(query, path)
            console.println("Called trusted function.");
            search.query(query, "Folder", path);


      I've also created a certificate, used it to sign the pdf, and granted the ability to run privileged javascript to the certificate, but it doesn't help.

      When I trigger this function from a button in the pdf, it gives me this:


      Called trusted function.


      NotAllowedError: Security settings prevent access to this property or method.
      Search.query:23:Field trustedsearch:Mouse Up


      (Of course it works fine if I simply open the same PDF outside of the AIR app).


      What else would I need to do to make this work when the PDF is inside a browser?