Create controls like checkbox using Aspose.Words for .NET

Can I create controls like checkbox, radio, textarea in word form using Aspose.Words for .NET component and then convert form to pdf? What other controls are available?
I have to create OMR like word form with dynamic multiple choice questions count. I have to create checkbox, radio, text field etc using your dll and then convert the form to pdf for print out.
Is there any component of Aspose’s that will fulfill the requirement?

Hi Sricharan,

Thanks for your inquiry. Please use the following code example to insert the legacy form controls into the document and save it to Pdf.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Check box ");
builder.InsertCheckBox("CheckBox", true, 0);
builder.Writeln("");
builder.Write("DropDown ");
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
builder.Writeln("");
builder.Write("TextInput ");
builder.InsertTextInput("TextInput", TextFormFieldType.Regular, "", "Hello", 0);
builder.Writeln("");
doc.Save(MyDir + "Out.pdf");

RadioButtons in MS Word document are ActiveX controls. Unfortunately, there is no way to insert ActiveX controls into MS Word documents using Aspose.Words. However, we had already logged this feature request as WORDSNET-1877 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

Moreover, please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.

Hi Tahir,
Thanks for the response. Its good to hear that checkbox controls can be created in word using Aspose word. I want to know the range of controls available with Aspose apart from checkbox and text input you mentioned. My aim is to generate OMR document with bubbles (along with input text and checkboxes).
Will I be able to generate OMR Bubbles in Word using Aspose? and then convert to pdf holding controls data
Regards,
Sricharan Kalavagunta
Software Developer,
Arcadix Infotech Private Limited

Hi Sricharan,

Thanks for your
inquiry. Please note that Aspose.Words mimics the same behaviour as MS Word does. Microsoft Word provides the following form fields: checkbox, text input and dropdown (combobox).

To programmatically create form fields in a Word document use DocumentBuilder.InsertCheckBox, DocumentBuilder.InsertTextInput and DocumentBuilder.InsertComboBox which make sure all of the form field nodes are created in a correct order and in a suitable state.

Please read about converting document to Pdf from here:
https://docs.aspose.com/words/net/convert-a-document-to-pdf/

Moreover, I suggest you please read about StructuredDocumentTag (SDT or content control) from here:
https://reference.aspose.com/words/net/aspose.words.markup/structureddocumenttag

Please manually create your expected OMR document using Microsoft Word and attach it here for our reference. We
will investigate how you want your final Word output be generated like.
We will then provide you more information on this along with code.