The facades FillField method is running very slow for one of my pdf forms. Most other run quickly. I have a sample program that illustrates the problem by comparing the slow form to a fast form.Can you take a look and tell me how I can speed up my slow form?
Code:
FileStream fs = new FileStream(sourceName, FileMode.Open, FileAccess.ReadWrite);
//open document
Aspose.Pdf.Facades.Form form = new Aspose.Pdf.Facades.Form(fs);
int currentField = 0;
foreach (string formFieldName in form.FieldNames)
{
Aspose.Pdf.Facades.FieldType fieldType = form.GetFieldType(formFieldName);
if (fieldType == Aspose.Pdf.Facades.FieldType.Text)
{
form.FillField(formFieldName, currentField++.ToString());
System.Diagnostics.Debug.WriteLine("{0} Field {1}", stopwatch.ElapsedMilliseconds, formFieldName);
}
if (currentField >= 20)
break;
}
System.Diagnostics.Debug.WriteLine("20 fields loaded in {0}", stopwatch.ElapsedMilliseconds);
form.Save(targetName);
fs.Close();
I can upload the .NET solution if there is a way to do that.