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

Free Support Forum - aspose.com

Aspose.Pdf - Form.FillField


I’m using Aspose 6.6, just upgraded from an earlier version 4.4.

A webservice is using the Form.FillField in pdf files. And it has worked for 1-2 years. Now after the upgrade, It runs fine for the first request, then it hangs forever on the statement:
bool filled = form.FillField(aRepPhase, value);

I’m using a stream as output. Is there som kind of dispose that fails after the first request?


Hi Thomas,

Thank you for using our products and sharing the sample code with us. I tried using your code to test your issue but I am unable to replicate the scenario at my end. However, to exactly replicate your issue at our end, we would appreciate, if you create a sample application and post here to show us the issue or share source PDF document with us. This will help us regenerate the issue and get to the cause of the issue soon.

We apologize for your inconvenience.

Thanks & Regards,


I managed to get past the problem, using byte arrays, and convert them to MemoryStreams, then close() and Dispose(). Now I got a similar problem:

private static byte[] FormatPDFDokument(byte[] array, string absoluteUrl)
MemoryStream streamOfMergedPdf = new MemoryStream(array);
streamOfMergedPdf.Position = 0;

var pdf = new PdfFileInfo(streamOfMergedPdf);
int pageCount = pdf.NumberOfPages;

MemoryStream formatedPDFStream = new MemoryStream();

var formEditor = new FormEditor(streamOfMergedPdf, formatedPDFStream);
formEditor.AddSubmitBtn(“HttpSubmit”, pageCount, “Lagre”, ConfigFileHelper.GetStringValue(ConfigFileHelper.PDF_FORM_URL) + “?templateUrl=” + absoluteUrl, 10, 10, 150, 30);


formatedPDFStream.Position = 0;
array = formatedPDFStream.ToArray();


formEditor = null;

return array;

It runs fine the first time, then the second time, it hangs on the AddSubmitBtn line forever. If I wait one minute or something, it seems to run again. Keep in mind that its running under a Webservice on a IIS server.

thanks for your help

Hi Thomas,

Sorry for the inconvenience, please share the source PDF document you are using or if possible, kindly create a sample application and post here to show us the issue with template file. This will help us to exactly replicate your issue at our end and get the cause of the issue soon.

We are realy very sorry for the inconvenience.

Thanks & Regards,