If you want the user to select a file themselves, you won't be able to specify the default folder the file chooser dialog is set to. However, it will be "sticky" once chosen.
Thank you. That works fairly well, but It would be nice if I could do what I wanted.
It's not possible. You can either specify the entire file-path, or nothing.
If you do the latter you can't control to which folder it will default to.
On Tue, Nov 7, 2017 at 10:38 PM, email@example.com <
This is a follow up question to my original question above.
Is there a security reason for not permitting importAnFDF( ) to open a specific folder to allow the user to import an fdf file of the user's choice? This would be a great convenience. If there is no security rationale for not providing this functionality, how do I submit it as a constructive suggestion?
Even it there is a security concern, it seems to me that it ought to be made possible in a privileged context.
Yes, this is a security thing. Scripts, especially scripts in a document cannot be trusted. So access to the file system is heavily restricted. Part of this from early on was not providing robust functionality for functions that do access the file system. If you know the exact location of a file, you can access it with Acrobat JS, but specifying a folder is too much like fishing the system. The security issue has only gotten worse, so there was never any incentive to improve file system access.
That said, there is a way to do what you want to do. Which is to perform the folder access from an external VB app (assuming your on windows), and then load the FDF with either the IAC, or JS through the IAC. In this case the UI for opening the FDF is started and run outside of Acrobat. But the FDF load and displaying the loaded file still happen in Acrobat.
Here's a link to the IAC docs