Hello all, I am new to iText and am facing a problem when filling a form.  
First, the form is created using the example in the online tutorial. It creates 
a combo box with three values ('Red', 'Green', 'Blue' ). The exact code is in 
the example:    com.lowagie.examples.forms.FormCombo You get the attached form: 
combo.pdf Then code to select the value from the combo box is written and the 
form is flattened. 
   PdfReader reader = new PdfReader( 'combo.pdf');
   PdfStamper chooser = new PdfStamper( reader, new 
FileOutputStream('combo_selected.pdf'));

   AcroFields fields = chooser.getAcroFields();

   

   fields.setField( 'ACombo', 'Blue' ); 

   chooser.setFormFlattening( true );   chooser.close(); This result is a form 
with nothing on it: the attached form combo_selected.pdf I checked the mailing 
lists but couldn't find anything that would explain this behaviour. I tried on 
both iText 1.5.3 and iText 2.0.4. Thankyou in advance for your time. Mira Al 
Arab.
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Attachment: combo.pdf
Description: Adobe PDF document

Attachment: combo_selected.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to