Creating invisible digital signatures on iOS
It isn’t possible to create digital signatures without a signature form field; SignatureFormField
is always required for signing. However, it can have an empty bounding box, which makes it invisible:
// Create a new signature form element. let signatureFormElement = SignatureFormElement() // Position it in the document. signatureFormElement.boundingBox = CGRect(x: 100, y: 100, width: 100, height: 20) // Add it to the first page. signatureFormElement.pageIndex = 0 // Insert a form field for the form element. let signatureFormField = try! SignatureFormField.insertedSignatureField(withFullyQualifiedName: "Digital Signature", documentProvider: documentProvider, formElement: signatureFormElement) // Now perform your actual digital signing with the newly created form field. signFormField(signatureFormField)
// Create a new signature form element. PSPDFSignatureFormElement *signatureFormElement = [[PSPDFSignatureFormElement alloc] init]; // Position it in the document. signatureFormElement.boundingBox = CGRectMake(100.f, 100.f, 100.f, 20.f); // Add it to the first page. signatureFormElement.pageIndex = 0; // Insert a form field for the form element. NSError *error; PSPDFSignatureFormField *signatureFormField = [PSPDFSignatureFormField insertedSignatureFieldWithFullyQualifiedName:@"Digital Signature" documentProvider:documentProvider formElement:signatureFormElement error:&error]; if (!signatureFormField) { // Handle error. } // Now perform your actual digital signing with the newly created form field. [self signFormField:signatureFormField];
Refer to our guide on how to create digital signatures for more information.