Skip to content
Guides

Remove Digital Signatures

You can easily remove a digital signature, and when you do so, both the appearance and data associated with the signature will be deleted.

It's important to note that removing a signature does not remove the signature field.

This example shows how to remove digital signatures:

swift
// Get the digital signatures object.
if let url = Bundle.main.url(forResource: "filename", withExtension: "pdf") {
    let document = CPDFDocument(url: url)
    if let signatures = document?.signatures, let signature = signatures.first {
        
        // Delete the digital signatures.
        document?.removeSignature(signature)
    }
}
objective-c
// Get the digital signatures object.
NSURL *url = [NSURL fileURLWithPath:@"file path"];

CPDFDocument *document = [[CPDFDocument alloc] initWithURL:url];
NSArray *signatures = [document signatures];

CPDFSignature *signature = signatures[0];

// Delete the digital signatures.
[document removeSignature:signature];