Fhomasp
Fri, 27 Jun 2008 06:38:32 -0700
What do you mean? I did write the code in the original post, it's right there in the first post. I'm using the latest version of Adobe Reader and I have a full licence on Acrobat professional as well. I also have had the book in front of me from the beginning. How else would I be able to base the whole method on the code in the book at page 487. When I open the document no content is displayed in the combofield, the textfield itself. But when printed the first value of the list is displayed in the combofield on paper. My temporary solution to this is just clicking the button and not selecting anything. Then when printing the document, no content is displayed in the combofields, as it should be. I can then save the document and do what I want with it. Because of this my guess is that it might have a simple solution. >I'm guessing you're leaving it up to the PDF viewer/printer to render the combo box for you, expecting >the iText has some magical powers over viewers/printers. I really don't understand.. I'm not expecting anything out of the ordinary really. wasegraves wrote: > > -------------- Original message ---------------------- > From: Fhomasp <[EMAIL PROTECTED]> > <snip> >> But now that I am testing the document I encountered a problem when >> printing >> the document, more specifially with comboboxes. >> >> When I open the generated document everything seems to be good. There >> isn't >> a value in the combobox field, which is the way it's supposed to be. But >> then when i print it the first element in the dropdown box is filled in >> the >> field. That's of course not a desired result. The document should print >> values that are either selected or filled in, nothing else. >> I tried setting the option in the textfield "Hidden but printable", which >> makes the button with the list disappear. >> >> It might be something I overlooked (again!? :) ) > > Please let us know what version of Adobe Reader you are using. This is not > the behavior I see when I open, e.g., choicefields.pdf. > > Of course, without your code that demonstrates the behavior you do not > wish to have, we can only guess. > > I'm guessing you're leaving it up to the PDF viewer/printer to render the > combo box for you, expecting the iText has some magical powers over > viewers/printers. > > Using the example ChoiceFields in Section 15.2.3 "Creating choice fields", > pp. 486-488, one way to resolve your problem might be to add a null > option, "", or "None" at the beginning of the option list. Please let us > know if this solves your problem, when you do this with the ChoiceFields > example. > > I'm getting the feeling you're trying to use itext without benefit of the > book. Do you have it? If not, I can virually guarantee your employer is > not getting his money's worth for your efforts. > > BTW, you can find the Chapter 15 example I cited at > > http://1t3xt.info/examples/browse/?page=example&id=243 > > While you're there, you can show your appreciation for the extraordinary > resources the iText team has provided for us by leavinf a gift via a > PayPal donation. Just do it! I guarantee it'll make you feel good. :-) > > Best regards, > Bill Segraves > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Do you like iText? > Buy the iText book: http://www.1t3xt.com/docs/book.php > Or leave a tip: https://tipit.to/itexttipjar > > -- View this message in context: http://www.nabble.com/Combobox-printed%2C-prints-undesired-value-tp18151124p18155171.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar