-2

i have a problem to get a signature contents of PDF Document at swift.

in this case, i want to get a signature content and then hash it with SHA256 (my server will digitally signed this hash value, and i'll embedded it to original PDF Document)

in Java with iText library, there is a function (getAcroFields and getSignatureDictionary) how about swift?

how to solved this issue, thanks

1 Answers1

0

I'm an iOS Enginner at PSPDFKit. I'm answering this question because it's tagged with . For future requests, please reach out to us at https://pspdfkit.com/support/request. This will guarantee faster response times and a better and more streamlined support experience.


You can use PDFFormParser to fetch either the field objects or annotation objects using the formFields or forms property. If you need to retrieve a specific field or annotation object, you can use findField(withFullFieldName:) or findAnnotation(withFieldName:) method:

let document = PDFDocument(/* initialize your document */)
let formFields = document.formParser.formFields

To learn more about working with signatures in PSPDFKit, check out our Digital Signatures guide, and especially the Signing a Document Using Your Own Encryption section. To learn more about working with forms in general, check out our Introduction to Forms guide.

akashivskyy
  • 44,342
  • 16
  • 106
  • 116