Hi,
how can i create a annotation with free text?
If I create text annotation, the annotation is editable and I want to create text anntation looks like label, or freetext.
property .isReadOnly = true doesnt work.
if PDFAnnotationSubtype is PDFAnnotationSubtype.freeText in PDF is showed only yellow box with no text.
let labelText = PDFAnnotation(bounds: textBounds, forType: PDFAnnotationSubtype(rawValue: PDFAnnotationSubtype.widget.rawValue), withProperties: nil)
//let labelText = PDFAnnotation(bounds: textBounds, forType: PDFAnnotationSubtype(rawValue: PDFAnnotationSubtype.freeText.rawValue), withProperties: nil)
labelText.widgetFieldType = PDFAnnotationWidgetSubtype(rawValue: PDFAnnotationWidgetSubtype.text.rawValue)
labelText.widgetDefaultStringValue = "My free text showed in PDF"
labelText.isReadOnly = true
labelText.fontColor = .blue
labelText.font = .systemFont(ofSize: 13)
labelText.alignment = .center
labelText.backgroundColor = .red
pdfPage.addAnnotation(labelText)