TextWidget: Automatic text wrapping

Product: PDFNet.dll (PDFNet SDK for .NET)

Product Version: 9.4.8.503

Is it possible to wrap the long text automaticlly?

using (PDFDoc doc = new PDFDoc())
{
	// Create a blank new page and add some form fields.
	Page blank_page = doc.PageCreate();

	// Text Widget Creation 
	TextWidget text1 = TextWidget.Create(doc, new Rect(100, 700, 140, 730));
	text1.SetText("Single-line Text ABC DEF GHI JKL MNO PQR STU VWX YZ");
	text1.SetBorderColor(new ColorPt(0, 0, 0), 3);

	text1.RefreshAppearance();
	blank_page.AnnotPushBack(text1);
	doc.RefreshFieldAppearances();				

	doc.Save(output_path + "forms_test1.pdf", 0);
}

Result:
grafik

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

You can set the following flag and then refresh the appearance to set textwrapping on:
https://www.pdftron.com/api/PDFTronSDK/dotnetcore/pdftron.PDF.Field.Flag.html

Another option is to instead use the FreeText anot which has textwrapping on automatically.
For more info please view this guide:

Hi kmirsalehi,

FreeText is a good alternative

thanks a lot.