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.
var trustedFolderSearch = app.trustedFunction(
console.println("Called trusted function.");
search.query(query, "Folder", path);
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?