Search code examples
javascriptpdfacrobat

Acrobat Javascript Create folder


Is it possible to create a folder with javascript, I am using trusted folder level functions from the menu. Is the method mkdir?


Solution

  • Acrobat JavaScript cannot create folders. When you use doc.saveAs with a path, that path must exist and must be considered "safe". A safe path cannot point to a system critical folder, for example a root, windows or system directory and there are other test that are not specified in the documentation. If you try to save to one of the non-safe paths, even from a trusted function, you can get a NotAllowedError.