Radio Button Issues

Latest version Aspose.PDF with .Net 4.5. A few issues need help:

  1. How to change the radio button into checkbox style? Setting “Style” to BoxStyle.Check generates null object reference error.
  2. How to make radio button option field side by side without using table? Setting both radio button option field to “InLineParagraph=true” does not generate side by side output.
string dataDir = @“test.pdf”;
License lic = new License();
Document doc = new Document();
Page page = doc.Pages.Add();
page.SetPageSize(8.572, 1172);
RadioButtonField rb = new RadioButtonField(doc);
rb.PartialName = “YesNoOption”;
doc.Form.Add(rb, 1);
RadioButtonOptionField rbo1 = new RadioButtonOptionField();
RadioButtonOptionField rbo2 = new RadioButtonOptionField();
rbo1.OptionName = “YES”;
rbo2.OptionName = “NO”;
rbo1.Width = 12;
rbo1.Height = 12;
rbo2.Width = 12;
rbo2.Height = 12;
rbo1.IsInLineParagraph = true;
rbo2.IsInLineParagraph = true;
//rbo1.Style = BoxStyle.Check;
//rbo2.Style = BoxStyle.Check;
rbo1.Caption = new TextFragment(“YES”);
rbo2.Caption = new TextFragment(“NO”);
rbo1.Border = new Border(rbo1);
rbo1.Border.Width = 1;
rbo1.Border.Style = BorderStyle.Solid;
rbo1.Characteristics.Border = System.Drawing.Color.Black;
rbo1.DefaultAppearance.TextColor = System.Drawing.Color.Black;
rbo2.Border = new Border(rbo2);
rbo2.Border.Width = 1;
rbo2.Border.Style = BorderStyle.Solid;
rbo2.Characteristics.Border = System.Drawing.Color.Black;
rbo2.DefaultAppearance.TextColor = System.Drawing.Color.Black;
// Save the PDF file
catch (Exception ex)

Hi Zhen,

Thanks for your inquriy. I have tested the scenario and noticed the reported issues in Radio Buttons creation, so I have logged following issues in issue tracking system for further investigation and rectification. We will notify you as soon as these are resolved.

PDFNET-41520: Setting BoxStyle throws NullReference Exception
PDFNET-41521: Adding Radio Button options side by side

We are sorry for the inconvenience.

Best Regards,