Two questions actually:
1) Is it possible by scripting (javascript), to use portfolio properties (meta)data in a pdf form which is added to the portfolio?
2) Is it possible by scripting (javascript), to use the folder name (folder which is added to the portfolio) in a pdf form which is added to this folder?
Workflow: a portfolio with the 'on a image' layout, user adds a folder, user adds a picture and a pdf form to this folder, user fills out the form, user extracts data in local database by ADBC.
A want to automate this database input by using the folder name and the 'parent' portfolio properties data.
OS: Windows 7
Acrobat version: Acrobat 9 Pro extended (don't use LiveCycle)
Local server: WampServer 2 (MySQL database)
A big thanks in advance!
Take a look at this link for an explanation of how to disclose the parent to the member documents (it refers to packages, but applies to portfolios as under the skin they're the same thing). Using the methods it describes it will be possible to return the portfolio's metadata object to a member document via a new app-level function.There's no way in JavaScript to find the folder name for a document, as "folders" in a portfolio are strictly a virtual concept. Because PDF file attachments cannot have tree structures, they're not part of the child document's path property, nor are they listed in the portfolio's dataObjects array. The "structure" is of course disclosed to the SWF navigator so it can draw the icons properly, but that's all.
Note that ADBC has been removed from the Acrobat X Family. You should convert to workflows that use XFA or SOAP.