Expand my Community achievements bar.

How can I get the filename of my open pdf?

Avatar

Former Community Member
i've tried var filestoget = doc.documentFileName; but that doesn't work. Any suggestions? Or better yet, code? Thank you.
1 Reply

Avatar

Former Community Member
doc is not a valid xfa command (that is an AcroForm command). To get to the doc object in xfa you must use event.target. So your command woudl be:



var filestoget = event.target.documentFileName;



Or if you prefer:



var oDoc = event.target;

var filetoget = oDoc.documentFileName;