Justify Text in a Textbox Field

Implementation details

FormEditor class in Aspose.Pdf.Facades namespace offers the capability to decorate a PDF form field. Now, if your requirement is to justify the text in a textbox field, you can easily achieve that using AlignJustified value of FormFieldFacade enumeration and calling the FormEditor.DecorateField method. In the below example, first we will fill a Textbox Field using the FillField method of Form class. After that we will use FormEditor class to justify the Text in the Textbox Field. The following code snippet shows you how to justify text in a Textbox Field.

Please note that justified alignment is not supported by PDF that’s why text will be aligned left when you input the text in the Textbox Field. But when field is not active text is justified.