Is there a way to determine a field's visibility status? #1644
-
Beta Was this translation helpful? Give feedback.
Answered by
iwilson001
Jun 27, 2024
Replies: 1 comment 2 replies
-
I didn't figure this out on my own. I got help and this is what we ended up with. Once we have the field, we can access the acroField property and subsequently, the getWidgets() function. From there it's a matter of iterating over the widgets and checking to see if it has the annotation flag of hidden |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
iwilson001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't figure this out on my own. I got help and this is what we ended up with. Once we have the field, we can access the acroField property and subsequently, the getWidgets() function. From there it's a matter of iterating over the widgets and checking to see if it has the annotation flag of hidden
w.hasFlag(AnnotationFlags.Hidden)
where w is of type PDFWidgetAnnotation, and AnnotationFlags comes from this library, src/core/annotation/flags.ts.