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

Free Support Forum - aspose.com

How do you find determine of a Field is hidden or not?

Both Hidden and Visible fields always show as Default



if (field.Flags == Aspose.Pdf.InteractiveFeatures.Annotations.AnnotationFlags.Hidden)


This condition never is never true even is the field is Hidden when you check the PDF.


I have attached the PDF I’m using to test with. It has several “Hidden” fields but they all show up as Default - even when I try the myForm.GetFieldAppearance(“Principal_Name_1”) method.

Hi there,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for .NET 10.6.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-39063 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
Calibri;color:#333333;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>Best Regards,

Thanks. Where is your issue tracking system located? Is that publicly accessible?

Hi there,


Thanks for your inquiry. Please note our issue tracking system(JIRA) is our internal and I am afraid you can not access it. However you may ask us for the update or we will keep you updated about the resolution progress within this forum thread.

We are sorry for the inconvenience caused.

Best Regards,

No problem. Can you give me a rough ETA as to when I can expect a fix release? Or when should I check back in?

Hi there,


Thanks for your inquiry. We have recently noticed the issue and it is pending for the investigation in the queue with other issues. We will be in a good position to share an ETA as soon as analysis of issue is completed. We will keep you updated within this forum thread.

We are sorry for the inconvenience caused.

Best Regards,

Is there a status update on this bug?

Hi there,


Thanks for your inquiry. I am afraid your reported issue is still not resolved. Currently our product team is busy in resolving other issues in the queue, reported earlier. We will notify you as soon as we made some significant progress towards your issue resolution.


We are sorry for the inconvenience caused.


Best Regards,

Hi there,

Thanks for your patience. We have tested the scenario and noticed that the issue is caused by Acro form structure. Principal_Name and some other fields have child sub-annotations, each annotations has it's own Flags and field itself does not have flag. So please update your code as following to accomplish the task:

Document pdf1 = new Document("39063.pdf");

Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form(pdf1);

foreach (Aspose.Pdf.InteractiveFeatures.Forms.Field field in pdf1.Form.Fields)

{

int flags = (int)field.Flags;

if (field.Count > 0)

{

int index = 1;

foreach (WidgetAnnotation subField in field)

{

flags = (int)subField.Flags;

Console.WriteLine("Sub field " + index);

index++;

if ((flags & (int)AnnotationFlags.Hidden) != 0)

{

Console.WriteLine("hidden");

}

else

Console.WriteLine("visible");

}

}

else

{

if ((flags & (int)AnnotationFlags.Hidden) != 0)

{

Console.WriteLine("hidden");

}

else

Console.WriteLine("visible");

}

//field.Flatten();

string fieldFullName = field.FullName;

FormFieldFacade facadeField = pdfForm.GetFieldFacade(fieldFullName);

Aspose.Pdf.Facades.FieldType fieldType = pdfForm.GetFieldType(fieldFullName);

//pdfForm.FillField(fieldFullName, "44.name_vorname");

Console.WriteLine("field FullName: {0} page: {1} flags: {2}",

field.FullName, facadeField.PageNumber, (int)flags);

}


Please feel free to contact us for any further assistance.

Best Regards,