Create the combo using TextField. The tutorial is outdated and this is described in the book.
Paulo ----- Original Message ----- From: "Mira Al Arab" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, August 24, 2007 9:36 AM Subject: [iText-questions] Flattening combo boxes 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. ------------------------------------------------------------------------- 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/
