I would like to generate a log to track the names and outcomes of files processed from a watched folder. I don't see a way to access the name of the file from within the process. I have a variable "inPDF" which is data type "document" and "outResult" which is type "xml" but I don't see a way to access the file name (or path) of the "inPDF" "document" object. Is there a way to access the file name and path?
Solved! Go to Solution.
Views
Replies
Total Likes
The document's name and path can be accessed using the document's attributes. If you are using a process, you can use a SetValue operation and get the attributes using the getDocAttribute function (under Functions/Document Object Functions). There are three attributes that are of interest:
basename - gives you just the file name
file - gives the filename and the path (usually from the stage directory)
wsfilename - the filename for workspace, in most cases the same as file.
Views
Replies
Total Likes
You can use xPath and use the function getDocAttribute (/process_data/@inDoc,"filename") to get the attribute into a string.
Jasmin
The document's name and path can be accessed using the document's attributes. If you are using a process, you can use a SetValue operation and get the attributes using the getDocAttribute function (under Functions/Document Object Functions). There are three attributes that are of interest:
basename - gives you just the file name
file - gives the filename and the path (usually from the stage directory)
wsfilename - the filename for workspace, in most cases the same as file.
Views
Replies
Total Likes
Thank you, this sounds promising.
Where can I find documentation describing the attributes that can be retrieved using the getDocumentAttribute function? Also, where can I find a complete reference on the Document object?
Best Regards,
Noam
Views
Replies
Total Likes
There isn't really a set list of attributes because the document object allows anyone to add thier own (setAttribute). You can get a list of all the ones set on a existing document using the listAttributes function. Here is some useful documentation:
The official documentation has info on the document functions:
The attributes used by attachments and notes (Workspace type attributes):
The JavaDocs for the 9.0 (LiveCycle ES2) document object:
http://help.adobe.com/en_US/livecycle/9.0/programLC/javadoc/com/adobe/idp/Document.html
Views
Likes
Replies
Views
Likes
Replies