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

Free Support Forum - aspose.com

VerticalAlignment Property on Forms Textbox has no effect

We are trying to set the vertical alignment of a form text box, but setting the property doesn’t seem to have any effect. We have tried on both multiline and single line boxes. Using one of the Aspose samples we boiled it down to a pretty simple test:

// Open document
        var dataDir = @"C:\inetpub\wwwroot\CSS\CsS.Scratch\";
        Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(dataDir + "TextField.pdf");

        // Create a field
        TextBoxField textBoxField = new TextBoxField(pdfDocument.Pages[1], new Aspose.Pdf.Rectangle(100, 200, 400, 400));
        textBoxField.PartialName = "textbox1";
        textBoxField.Value = "Text Box Line 1" + Environment.NewLine + "Line 2";

        // TextBoxField.Border = new Border(
        Border border = new Border(textBoxField);
        border.Width = 5;
        border.Dash = new Dash(1, 1);
        textBoxField.Border = border;
        textBoxField.Multiline = true;
        textBoxField.VerticalAlignment = VerticalAlignment.Bottom;

        // Add field to the document
        pdfDocument.Form.Add(textBoxField, 1);

        dataDir = dataDir + "TextBox_out.pdf";
        // Save modified PDF

Multiline textboxes always seem to display the text at the top and single line textboxes always seem to vertically align center.

Any help is appreciated.




Thanks for contacting support.

We were able to reproduce the issue in our environment while using Aspose.PDF for .NET 19.3. Hence, we have logged it as PDFNET-46152 in our issue tracking system for the sake of detailed investigation. We will further check the issue in details and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Great, thanks for your prompt attention to this!

Any update on this?


As issue has recently been logged in our issue tracking system, it is pending for analysis. Please note that there are other pending issues in the queue as well, which were logged prior to yours and issues are resolved on first come first serve basis in normal support model. Nevertheless, we will surely inform you as soon as we make any significant progress towards issue resolution. Please spare us little time.

We are sorry for the inconvenience.

Any update on this please? We really need this issue resolved.


We are sorry that earlier logged issue is not yet resolved because of other high priority issues in the queue. Furthermore, we also offer priority support model where issues have high priority and are resolved on urgent basis. You may consider it in case your issue is a blocker for you. We will surely let you know in case any progress is made towards issue resolution. Please spare us little time.

We are sorry for the inconvenience.

We just added Developer priority support to our license. Can you escalate this thread to the paid support group please?


In case you have subscribed to paid support, you should be able to login into helpdesk using similar email address used during subscription purchasing. Please login into helpdesk and post there with ticket reference, your issue will be prioritized accordingly.

The issues you have found earlier (filed as PDFNET-46152) have been fixed in Aspose.PDF for .NET 20.2.