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

Free Support Forum - aspose.com

GetFieldType always returns InvalidNameOrType

One of my methods was checking the field type prior to filling it in, mainly because there is no support for GetFieldType returning an ImageField type. Up until recently this worked fine, although now it seems to always return InvalidNameOrType.


If I comment out most of the code and just tell the PDF Form object to fill the field (passing the same name I pass into GetFieldType), it fills it just fine.

Has anyone else experienced this problem?

My fields are named “FieldName” and "FieldEmail"


When I throw these into pdf.FillField(“FieldName”, “my value”) it works.

When requesting the type via pdf.GetFieldType(“FieldName”) it returns InvalidNameOrType. However if I provide pdf.GetFieldType(“form1[0].#subform[0].FieldName[0]”) it returns a Text FieldType. Did this just change? I’m pretty sure I haven’t upgraded my library at all. Is there a way to avoid the longer name, my method is only being passed what I named the field in the pdf (FieldName, FieldEmail).

Nevermind, found the call GetFullFieldName, this will help me out. Thanks.

Hi Phil,

I’m glad to know that the issue is resolved at your end. However, if you still find any problem or need further assistance, please share the input PDF file with us, so we could further investigate the issue and guide you accordingly.

We’re sorry for the inconvenience.
Regards,