read xfa using sdk

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

joejoe
User
Posts: 11
Joined: Wed Jan 09, 2008 7:18 pm

read xfa using sdk

Post by joejoe »

I noticed the announcement that the viewer now support xfa forms. I am wondering if the sdk can read and write data to xfa forms. Does any of the sdks have the ability to programatically read and/or filf xfa fields in pdf documents?
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: read xfa using sdk

Post by Vasyl - PDF-XChange »

Hi, joejoe.

You may get/set values for XFA-form fields by Java-Script also (we talking about PDF-XChange Viewer ActiveX SDK only).
Simple example (pseudocode):

Code: Select all

// get existing form field value:
string js = "var f = this.getField("Text2"); if (f != null) { f.value; };");
string res;
viewerCtrl.RunJavaScript(js, out res, 0, 0); // look to 'res' after call 
// set new value:
string js = "var f = this.getField("Text2"); if (f != null) { f.value = "myNewValue"; };");
viewerCtrl.RunJavaScript(js, NULL, 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.