Copy link to clipboard
Copied
This works fine in the Javascript area of a pdf document:
this.exportAsXFDF({cPath:"/C/My folder/2020/File.XFDF",bAnnotations:true})
But I don't know how to change the C/My folder/2020/File.XFDF to The User's Document folder/2020/File.XFDF?
Today I worked on it and it and used a variable for the user documents map and filename. Then checked it with the app.alert function. And then put the variable after cPath and it workes fine. (Windows 8.1).
Copy link to clipboard
Copied
The things available to you are deliberately limited and deliberately locked out of embedded JavaScript, but check out app.getPath, it looks like it is designed to return what you need.
Copy link to clipboard
Copied
Yes, you can get it using this code, but you have to run it from a privileged context:
app.getPath("user", "documents");
Copy link to clipboard
Copied
Thank you for your reply, but I don't know where the privileged context is, only where the Javascript area of a pdf document is.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Today I worked on it and it and used a variable for the user documents map and filename. Then checked it with the app.alert function. And then put the variable after cPath and it workes fine. (Windows 8.1).