Hello,
I am using Aspose.PDF 20.5.0.0 for .Net. I am filling fields in the attached form using the code below. The call to FillField can take between 1 and 6 seconds, which seems much slower than normal. Is there a reason for this?
Aspose.Pdf.License lic = new Aspose.Pdf.License();
lic.SetLicense(@“IHT400.pdf (1.2 MB)
IHT400.pdf (1.2 MB)
Aspose.pdf.lic”);
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(@“IHT400.pdf”);
for (int f = 0; f < form.FieldNames.Length; f++)
{
System.Diagnostics.Stopwatch sw = System.Diagnostics.Stopwatch.StartNew();
Aspose.Pdf.Facades.FieldType fieldType = Aspose.Pdf.Facades.FieldType.Text;
try
{
fieldType = form.GetFieldType(form.FieldNames[f]);
}
catch (Exception e)
{
}
switch (fieldType)
{
case Aspose.Pdf.Facades.FieldType.Text:
case Aspose.Pdf.Facades.FieldType.ComboBox:
case Aspose.Pdf.Facades.FieldType.MultiLineText:
form.FillField(form.FieldNames[f], "test");
Console.WriteLine(sw.Elapsed);
break;
case Aspose.Pdf.Facades.FieldType.CheckBox:
form.FillField(form.FieldNames[f], true);
break;
}
}