Tech Off Post

Single Post Permalink

View Thread: ASP.NET and iTextSharp (free PDF Generator for .NET)
  • fooey

    I created a PDF in Adobe Designer 7.0 with the usual text fields.

    I also added three RadioButtonList controls.

    Populating the PDF's text fields was trivial, but selecting a PDF radio button was not.

    I checked the iText (Java) documentation and found instructions. 

    Here's how in C#: 

    /* myRadioButton1 is what I named the Radio Button control in Adobe Designer. The "1", "2" etc. are the value automatically assigned by Adobe Designer. */

    fields.SetListOption("myRadioButton1", new String[] { "1", "2", "3", "4", "5", "6" }, null);

    /* this selects the second radio button. */

    fields.SetField("myRadioButton1", "2");

    I hope this helps someone else.

    tags: RadioButtonList Radio RadioButton SetListOption input type="radio"