We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Create Text Box

Hi.,

How to create Multiline text box.

Sunil

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. If you mean formfield textbox then you can’t specify that it is multi-line. But you can insert multi-line text into the formfield. Please see the following code example.

//Open document

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

//Inset textbox formfield

builder.insertTextInput("myTxt", TextFormFieldType.REGULAR_TEXT, "", "first line \r\nsecondline", 0);

//save document

doc.save("C:\\Temp\\out.doc");

Hope this helps.

Best regards.