Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How can I get the filename of my open pdf?

Not applicable
i've tried var filestoget = doc.documentFileName; but that doesn't work. Any suggestions? Or better yet, code? Thank you.
1 Reply
pguerett
Level 10
Level 10
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;