- #HOW TO FIND FILE LOCATION ADOBE ACROBAT ON MAC SOFTWARE#
- #HOW TO FIND FILE LOCATION ADOBE ACROBAT ON MAC CODE#
If a path is provided to the function, then no dialog is displayed and the operation is handled silently, i.e., the user is not necessarily aware that data has been saved to their hard drive. The file browser dialog gives users control over how data is saved to their systems. If no path parameter is provided to the function, Acrobat displays a file-browser dialog. These functions include doc.saveAs() and all of the data export functions, like doc.exportAsFDF().Īcrobat provides us with two modes of operation for these functions-with a path and without a path. Path-use restrictionsĪll Acrobat JavaScript functions that write a file to the user’s local disk pose a security risk, so there are some restrictions placed on their use. This function returns a number of standard Acrobat related paths on the user’s system. In cases where a relative path cannot be used, an absolute path can be built from the path of an already open document, using the doc.path property, or from a path acquired from the app.getPath() function.
#HOW TO FIND FILE LOCATION ADOBE ACROBAT ON MAC CODE#
For example, the following code exports an FDF file to a folder one directory level up from the current document. Relative paths work quite well when working with groups of related files. Every Document Object function that utilizes a path input uses the document’s own path to anchor a relative path. The solution to getting around this issue is to use relative paths whenever possible. From the table above, we can see that each platform has its own, and very different, root-drive specification. Unfortunately, switching out path separators does not necessarily make a path platform independent. A relative path includes only those path components between the starting path location and the target location. A relative path is one that assumes a starting point, usually the path to the current document. If a path does not contain a leading forward slash, then it is a relative path.
A leading forward slash means the path is an absolute path, i.e., it contains all path components from the root of the hard drive, through the intervening folders, to the file name. To work around the inherent platform dependencies, Acrobat uses a simple character substitution called the Device Independent Path specification, shown in the table below.įrom the table, we can see that a Device Independent path is formed by simply replacing the path separator with a forward slash character, “/”. This means the file paths must be compatible across these platforms as well. The challenge for Acrobat JavaScript is to be compatible across three platforms Windows, Macintosh and UNIX. On the surface, file paths seem straightforward, but in fact they are not always so simple. Acrobat JavaScript contains many functions that require a file path, for example, app.openDoc() and doc.saveAs(). However, when writing software, we have to be aware of any special file-path requirements and Acrobat JavaScript is no exception.
Programs typically provide file-browser dialogs for loading and saving files, thus hiding the details of how the paths are actually handled.
#HOW TO FIND FILE LOCATION ADOBE ACROBAT ON MAC SOFTWARE#
File paths are a common part of using any software application.