i'm trying to populate a listbox for a document that was created with adobe
acrobat 8 life cycle designer.  When I run the following, i get the error:
object reference not set to an instance of an object.  ListBox1 is the name
of the listbox I'm wanting to populate.  Is the setlistoption not supported
for documents created in adobe designer?  Are there any other alternatives
to populating a listbox?

Thanks,
Robert

            PdfReader pdf = new PdfReader(@"c:\testlistbox.pdf");
            PdfStamper stp = new PdfStamper(pdf, File.Create
(@"c:\listboxaa1.pdf"));
            AcroFields af = stp.AcroFields;

            af.SetListOption("ListBox1", new String[] { "a", "b", "c" }, new
String[] { "first", "second", "third" });
            stp.Close();
            pdf.Close();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to