There are a couple different places the script can be stored:
1) In an XFA form, the script is all in the XFA.  You'll have to parse some XML 
to get it.
2) In an AcroForm, the scripts will be in/referenced-from that field's /AA 
dictionary (additional actions).  
3) Additional Actions scripts can call functions stored at the document level 
/Names dictionary.  Within the /Names dict there can be a /Javascript entry 
which will be a "Name Tree".  Name tree's are arrays that act like dictionaries 
but maintain a particular order to their entries.  The /Names dictionary and 
its kids might be indirect objects, might not.  PdfDictionary & PdfArray have a 
group of getAs* functions will look up indirect objects automatically for you, 
returning null if the object is missing or the wrong type.
 
 

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com

#include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 

-----Original Message-----
From: Gajda, Tim (MDIT) [mailto:[email protected]]
Sent: Wednesday, November 18, 2009 7:35 AM
To: [email protected]
Subject: [iText-questions] Accessing Text field custom validation script 
viaItext



I am trying to access a "custom validation script" created for a text field in 
a PDF.  I am attempting to use PDFreader to do this, but I am not having any 
luck finding the script.  It does not appear to be stored with the rest of the 
field specific data.  

Thanks,

Tim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to