hello
i am looking for some code that returns the values and attributes of the form fields
also some code to change the fields would be great
many thanks
joe@csolutions.com.au
read/write form field
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: read/write form field
Hi, joeitaliano.
We supported many features from Adobe's Java Script for PDF, look to reference:
http://www.adobe.com/content/dam/Adobe/ ... erence.pdf
And you may run any JS by (see our Active SDK Help, [Reference/JavaScript Support]):Example:
- script changes the value of field and prints (to result argument) the value before/after change.
HTH.
We supported many features from Adobe's Java Script for PDF, look to reference:
http://www.adobe.com/content/dam/Adobe/ ... erence.pdf
And you may run any JS by (see our Active SDK Help, [Reference/JavaScript Support]):
Code: Select all
string result;
ctrl.RunJavaScript(<java_script_string>, out result, 0,0);
Code: Select all
string js = "var f = this.getField("<theFieldName>"); if (f != null) { f.value; f.value = "myNewValue"; f.value; };";
string result;
ctrl.RunJavaScript(js, out result, 0,0);
HTH.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 89
- Joined: Wed Dec 29, 2010 8:50 am
Re: read/write form field
thanks it worked great
can i assume then that the your JavaScript implementation is 100% compatible with adobe so i can use the functions in their manual
thanks again
can i assume then that the your JavaScript implementation is 100% compatible with adobe so i can use the functions in their manual
thanks again
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: read/write form field
Yes - we endeavour always to ensure such items are Adobe compatible - though always note the caveat that Adobe FREQUENTLY deviate from their own documentation and we have found ourselves spending literally days 'scratching our heads' wondering why something did not work before realising this was the case - so if you come across such a case - dont be surprised. 

If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 89
- Joined: Wed Dec 29, 2010 8:50 am
Re: read/write form field
john
i just received a pdf file that has form fields of fixed length
when i view it with adobe and type in the field it does not allow you to enter more than the box size
however with the sdk and the reader it allows you to exceed the limit
any reason for this
can i send you the file to look at for me
i have no way of working this out
thanks
i just received a pdf file that has form fields of fixed length
when i view it with adobe and type in the field it does not allow you to enter more than the box size
however with the sdk and the reader it allows you to exceed the limit
any reason for this
can i send you the file to look at for me
i have no way of working this out
thanks
-
- Site Admin
- Posts: 7371
- Joined: Wed Mar 25, 2009 10:37 pm
Re: read/write form field
HI Joe,
please do send the form and we'll take a look.
regards
please do send the form and we'll take a look.
regards
Best regards
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com