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

Free Support Forum - aspose.com

Slow performance of facades FillField method

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?


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)


        System.Diagnostics.Debug.WriteLine("20 fields loaded in {0}", stopwatch.ElapsedMilliseconds);

I can upload the .NET solution if there is a way to do that.

We have tested your code for a sample PDF document with the latest version 17.8 of Aspose.Pdf for .NET API and it takes 1.5 seconds to fill 20 fields. Kindly send us your source PDF and also let us know which Aspose.Pdf for .NET API version you are using. We will investigate and share our findings with you. Your response is awaited.

Best Regards,
Imran Rafique

Here is the pdf form that is slow to load. I do see other forms load quickly so I’m wondering what is different about this form and is there a faster way to load it?

SampleDoc.pdf (842.4 KB)

Thank you for sending a source PDF. It is taking 38 to 45 seconds to fill all fields (count 384) in our environment. We have logged an investigation under the ticket ID PDFNET-43248 in our issue tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.

Best Regards,
Imran Rafique

Is there any update on this issue? This is a critical issue for our customer.

The linked ticket ID PDFNET-43248 is pending for the analysis and not resolved yet. We have logged an ETA request under the same ticket ID PDFNET-43248. We will let you know once a significant progress has been made in this regard.

Any update on the prioritization of this ticket? My customer needs a solution quickly!

Unfortunately, there is no update on this ticket yet. The performance issues are known as the complex issues and can take more time than usual. In order to escalate this ticket, we recommend you please post this ticket in the Paid support forums. Please refer to details of paid support: Aspose - Paid Support Helpdesk