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

importData()

Not applicable
Hi everybody,



I've just create a new Form with a button that should import xml data by clicking.

I use the xfa.host.importData() method.

It's works perfect when I open the form in my environment, but when I

open it in a computer which only has a simple Abode reader, my import

button doesn't work anymore and I don't understand why.



Any help would be appreciated.



Pascal.
13 Replies
Steve_L_Walker
Level 10
Level 10
Pascal,



Importing and exporting data into a PDF form is possible under two circumstances:



1) The PDF is opened in Acrobat Professional (or the PDF is previewed in LiveCycle Designer and Acrobat Professional is running).



2) The PDF has been rights-enabled for importing and exporting data using LiveCycle Reader Extensions ES. If the PDF has not been rights-enabled for importing and exporting data, the import feature will not work in Reader.



This is true of other PDF document functions including local save and digital signatures, also.



Steve
pguerett
Level 10
Level 10
To be able to import a data file into Reader you must Reader Extend the document to allow this.
Not applicable
ok thanks for your help.
Anonymous
Not applicable

Hi,

I've been searching a lot about this question. If I understand well, it seems possible to allow Adobe Reader to importData just by "Reader Extending" the form.

I did it in Adobe Pro-9.3 by doing:

Advanced > Extend Features in Adobe Reader ...> 'Save Now'.

But I still get the Error

NotAllowedError : Security Settings prevent access to this property or method

Doc.importXFAData: ....MyButton.click

even in Adobe Pro. If I don't "Reader Extend" the pdf forms, I can importData in Adobe Pro.

Can anybody tell if I can allow my form to importData in Adobe Reader ?

Thanks a lot,

Best regards

jgr

pguerett
Level 10
Level 10

You do not need to Reader Extend to allow for a data import. But my guess is that you are nameing the file that needs to be imported a

nd that is what is causing the error. Acrobat/Reader wil not let you do an automatic operation like that unless the

script is running as a privelidged command. You can use the xfa.host.importData() without a paramater and a dialog will come up and allow the user to select a file. Note that by default an XDP extension will be require. If you have an XML file you want to load then the command woudl be:

xfa.host.importData("", false);

Hope that helps

Paul

Anonymous
Not applicable

Hi,

thanks a lot for your very quick answer.

I was indeed using xfa.host.importData() without any argument (as I thought I should) so that a file dialog pops up.

It's the only method which works out in LiveCycle and Adobe Pro, without Reader Extend.

I've just tried out your method with no result sadly!

Thanks for your help,

jgr

pguerett
Level 10
Level 10

Sorry I messed up ...I gave you the exportData syntax ....importData only allows one paramater (the filename) ...so you should be using

xfa.host.importData();

Is that working for you?

Paul

Anonymous
Not applicable

Hi,

thx again.

But no!, xfa.host.importData(); doesn't work... Only in LiveCycle and Adobe Pro without using the Advanced>Reader extension.

So no way to make it work in Adobe Reader, though it might be possible nevertheless. I missed out something somewhere...

Regards,

jgrd

pguerett
Level 10
Level 10

Sorry my mistake ...it will work if you Reader Extend using the server product .....it will not work if you Reader Extend using Acrobat (this is a subset of the server product). The server has an import/export form data right that can be set. When I turned that in it worked fine in reader. I assume that you do not have the server product....right?

Paul

Anonymous
Not applicable

>Sorry my mistake ...it will work if you Reader Extend using the server product .....it will not work if you Reader Extend using Acrobat (this is a subset of >the server product). The server has an import/export form data right that can be set. When I turned that in it worked fine in reader. I assume that you do >not have the server product....right?

>Paul

Mmh, your are quite right, I only have Acrobat Pro... I don't think I' can make my public institute buy the full server version! So no hope in this direction!

Thanks a lot for your help and sorry for misleading you with a lack of info at the beginning.

sb

Anonymous
Not applicable

Hi all,

sorry for replying once again on this topic. But I want to make it clear: is there any mean to reload in Adobe Reader the xml content of a a form, filled with the same "Reader" form, the xml content being sent by mail? If not, what are the solutions to load the form info into pdf?

Thanks again,

jgrd

NL_Erik_G
Level 2
Level 2

Hello,

is there an answer to this question? I am looking for the same solution.

Thanks!

Erik

pguerett
Level 10
Level 10

Not sure I follow the problem ,,,can you restate your issue?

Paul