Expand my Community achievements bar.

requesting repository path in script

Avatar

Former Community Member
How can I give out the repository path of an document to a text field?
6 Replies

Avatar

Former Community Member
You would have to get the repository path into a process variable and oush it into the data stream to merge with the form before you render it. That information is not available on the client.

Avatar

Former Community Member
ok, thats clear. Is it also possible to give out the path where the pdf is saved in filesystem finally. Is it possible to set this value to an input field in the postSave-event? How can I do this?

Avatar

Former Community Member
Are you saving this on the client and you want that path in the data stream?

Avatar

Former Community Member
Yes, the path of the pdf where it was saved on the local client. We'd like to set this value to a text field of the pdf form. So we can see where it was saved before printing. Should be a kind of

textfield_savedPath::postSave

this.rawData=form1.xmp.savedAt (in german "Speicherort" from document properties)



Regards, Leo

Avatar

Former Community Member
There is a path and filename command in Acrobat for the currently loaded document. To get at the doc object you can use the event.target command. So to get the filename use event.target.documentFilename and to get the path use event.target.path. Remember to do this after the file is saved.



Let me know that it worked for you.

Avatar

Former Community Member
Hi Paul,



thanks for the help. event.target.path works. I call it postSave in a textField like this:



this.rawValue = event.target.path;



The result is for instance "/D/temp/Test1.pdf". So with some corrections (cut the first slash, paste ":" behind the "D") it looks fine for our needs.



With event.target.documentFilename the result is "Empty".