Programmatically detect form fields

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

docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Programmatically detect form fields

Post by docu-track99 »

Is there any way to programmatically detect if a document has form fields defined or not?
ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Re: Programmatically detect form fields

Post by ugradedeveloper »

Call RunJavaScript() with the script:

"this.numFields"

If the return value is greater than zero, there are form fields.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7372
Joined: Wed Mar 25, 2009 10:37 pm

Re: Programmatically detect form fields

Post by Paul - PDF-XChange »

Nice one ugradedeveloper, succinct and to the point. :wink:
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com