Expand my Community achievements bar.

SOLVED

Accesing XFA data with javascript

Avatar

Level 2

Hello everybody:

I'm starting developing pdf-forms with LiveCycle and I'm finding some problems getting document info about author, filename, file path, etc. with javascript. I've read some manuals, but I can't find where to fetch this values. I've tried xfa.host..., xfa.datasets..., xfa.form... with no success.

Any suggestions?

Thanks for your time!

Regards,

javier

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here is an example show how to access the filename and path (don't worry about the button): https://acrobat.com/#d=ZnxO-dlXXFDS0GvYcQk2NQ

You can access the metadata, form properties, but I would need to dig up a script. Maybe have a search on the forum.

Hope that helps,

Niall

Assure Dynamics

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

Here is an example show how to access the filename and path (don't worry about the button): https://acrobat.com/#d=ZnxO-dlXXFDS0GvYcQk2NQ

You can access the metadata, form properties, but I would need to dig up a script. Maybe have a search on the forum.

Hope that helps,

Niall

Assure Dynamics

Avatar

Level 2

Thanks a lot!

That worked! I didn't find it because of the autocomplete function of the scripting tool of livecycle. Is it possible to acces this metadata info via any other path but that is not event.target?

Thanks again,

Javier

Avatar

Level 10

Hi Javier,

xfa.event.metadata; 

will get you the form's metadata, but I thought you could get specific parts of that like the form's creator. However I just can't put my hand on it at the moment.

If I dig up anything I will post later.

Niall