Is there an example somewhere of creating two or three separate RadioButton groups on the same page using the FormEditor (so that each of the radio buttons has text next to them).
Hi John,
One other issue I’m having (dealing with RadioButtons) is that no matter what size I specify, the RadioButtons are always the default size. I have tried to make them 10x10 and 100x100 and they both render the same size RadioButton… any ideas?
Hi John,
The issues you have found earlier (filed as PDFNEWNET-35869) have been fixed in Aspose.Pdf for .NET 8.7.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi John,
Thanks for your patience. As mentioned above RadioButton size issue has been fixed and please check following code snippet for setting radio button size. Hopefully it will serve the purpose. Moreover, we will notify you via this forum thread as soon as PDFNEWNET-35868 is implemented.
FormEditor formEditor = new FormEditor();
formEditor.BindPdf(myDir + "helloworld.pdf");
//RadioHoriz is true by default for horizontal placement. Set it false to place radio buttons vertical.
//formEditor.RadioHoriz = false;
formEditor.Items = new string[] { "AAA", "BBB", "CCC" };
formEditor.Facade = new FormFieldFacade();
formEditor.Facade.Caption = "Group1";
formEditor.Facade.BorderWidth = 1;
formEditor.Facade.BorderColor = System.Drawing.Color.Black;
formEditor.Facade.BorderStyle = FormFieldFacade.BorderStyleInset;
formEditor.RadioButtonItemSize = 10;
formEditor.RadioGap = 20;
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField", "BBB", 1, 110, 130, 300, 430);
formEditor.Items = new string[] { "DDD", "EEE", "FFF" };
formEditor.Facade = new FormFieldFacade();
formEditor.Facade.Caption = "Group2";
formEditor.Facade.BorderWidth = 1;
formEditor.Facade.BorderColor = System.Drawing.Color.Black;
formEditor.Facade.BorderStyle = FormFieldFacade.BorderStyleInset;
formEditor.RadioButtonItemSize = 20;
formEditor.RadioGap = 20;
formEditor.AddField(FieldType.Radio, "AddedRadioButtonField1", "EEE", 1, 110, 250, 210, 330);
//save updated file
formEditor.Save(myDir + "output_radiobutton.pdf");
Please feel free to contact us for any further assistance.
Best Regards,
Hi John,
Document doc = new
Document();<o:p></o:p>
Aspose.Pdf.Page page = doc.Pages.Add();
Aspose.Pdf.Table table = new Aspose.Pdf.Table();
table.ColumnWidths = "120 120 120";
page.Paragraphs.Add(table);
Aspose.Pdf.Row r1 = table.Rows.Add();
Aspose.Pdf.Cell c1 = r1.Cells.Add();
Aspose.Pdf.Cell c2 = r1.Cells.Add();
Aspose.Pdf.Cell c3 = r1.Cells.Add();
RadioButtonField rf = new RadioButtonField(page);
rf.PartialName = "radio";
doc.Form.Add(rf, 1);
RadioButtonOptionField opt1 = new RadioButtonOptionField();
RadioButtonOptionField opt2 = new RadioButtonOptionField();
RadioButtonOptionField opt3 = new RadioButtonOptionField();
opt1.OptionName = "AAA";
opt2.OptionName = "BBB";
opt3.OptionName = "CCC";
opt1.Width = 15;
opt1.Height = 15;
opt2.Width = 15;
opt2.Height = 15;
opt3.Width = 15;
opt3.Height = 15;
rf.Add(opt1);
rf.Add(opt2);
rf.Add(opt3);
opt1.Border = new Border(opt1);
opt1.Border.Width = 1;
opt1.Border.Style = Aspose.Pdf.InteractiveFeatures.Annotations.BorderStyle.Solid;
opt1.Characteristics.Border = System.Drawing.Color.Black;
opt1.DefaultAppearance.TextColor = System.Drawing.Color.Red;
opt1.Caption = new TextFragment("Item1");
opt2.Border = new Border(opt1);
opt2.Border.Width = 1;
opt2.Border.Style = Aspose.Pdf.InteractiveFeatures.Annotations.BorderStyle.Solid;
opt2.Characteristics.Border = System.Drawing.Color.Black;
opt2.DefaultAppearance.TextColor = System.Drawing.Color.Red;
opt2.Caption = new TextFragment("Item2");
opt3.Border = new Border(opt1);
opt3.Border.Width = 1;
opt3.Border.Style = Aspose.Pdf.InteractiveFeatures.Annotations.BorderStyle.Solid;
opt3.Characteristics.Border = System.Drawing.Color.Black;
opt3.DefaultAppearance.TextColor = System.Drawing.Color.Red;
opt3.Caption = new TextFragment("Item3");
c1.Paragraphs.Add(opt1);
c2.Paragraphs.Add(opt2);
c3.Paragraphs.Add(opt3);
doc.Save(outFile);
The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan