The line spacing in multiline fields is broken on some of our form fields if we use a version of Aspose.PDF after v17.2.0. I assume this is related to change PDFNET-42024, “Line Spacing Increased on Multiline Textbox”. This is still broken in Aspose.PDF v19.6.0.
Acrobat Reader handles the form field correctly.
TextField.pdf (3.1 KB)
namespace AsposePlayground
{
using System.Linq;
class Program
{
static void Main(string[] args)
{
var pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense("Aspose.Total.lic");
var form = new Aspose.Pdf.Facades.Form("TextField.pdf");
form.FillField("TextField", string.Concat(Enumerable.Repeat($"abcdefghijklmnopqrstuvwxyz\n", 5)));
//form.FlattenAllFields();
form.Save($"TextField-Modified.pdf");
}
}
}