Hi,
I try to check which signature fields annotations are filed in.
I tried to get some values from the annotation but I can't tell if the signature field is filled.
I only found one thing. If signature field was filled annot.widgetStringValue return empty string ("").
If the field wasn't filled, annot.widgetStringValue return nil.
Here is me code:
private func setupAnnotation(page: PDFPage) {
for annot in page.annotations {
if annot.widgetFieldType == .button {
}
else if annot.widgetFieldType == .choice {
}
else if annot.widgetFieldType == .signature {
let value = annot.value(forAnnotationKey: .widgetValue)
print(value)
print(annot.widgetStringValue)
print(annot.accessibilityValue)
print(annot.annotationKeyValues)
}
else if annot.widgetFieldType == .text {
}
}
}
There is no property such as "isFilled", or "isSigned", or "hasValue".
How can I check if signature field is filled?