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

Free Support Forum - aspose.com

Offset in formfield which spans multiple lines

When filling in a form field, if the value entered in to the form field spans two lines the first and subsequent lines have a different left-hand offset. See attached image.

The form field values are being updated with the following code snippet.

formFields[i].Result = Convert.ToString(value);

Is there a way to eliminate this “offset” issue?

Hi Doug,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Thanks Tahir,

The attached zip file contains the requested files.

Hi Doug,

Thanks for sharing the detail. Please note that Aspose.Words mimics the same behavior as MS Word does. If you insert the same contents in FormField using MS Word, you will get the same output. There is a space before FormField. Please remove this space and execute your application again to get the required output. We have attached the modified input document with this post for your kind reference.

Please let us know if you have any more queries.

I should have caught existence of the space. Thanks for point that out!