I have a PDF document which I want the user to sign and date. I can add the signature by searching for my Signature string "Sig" and place a graphic annotation on it. But I want to then replace or hide the "Sig" text. Also I have a date field and want to automatically add a date to the document by searching for "Date:" and then putting in a text annotation. I can't seem to find out how to annotate with text, only images. Here is what I have for the image:
let imageStamp = ImageStampAnnotation(with: signatureImage, forBounds: imageBounds, withProperties: nil)
let selections = page.document?.findString("Sig", withOptions: [.caseInsensitive])
guard let page1 = selections?.first?.pages.first else { return }
selections?.forEach({ selection in
page1.addAnnotation(imageStamp)
})
How do I do a text annotation so that my date string will appear after the word Date:?