How to disable digital signature removal in PDFs
Set allowDeletingDigitalSignatures
to false to disable removing of added Digital Signatures. Get additional resources by visiting our PSPDFSignedFormElementViewController API guide.
//// Copyright © 2019-2025 PSPDFKit GmbH. All rights reserved.//// The Nutrient sample applications are licensed with a modified BSD license.// Please see License for details. This notice may not be removed from this file.//
import PSPDFKitimport PSPDFKitUI
class DisableRemovingDigitalSignatureExample: Example {
override init() { super.init() title = "Disable removing Digital Signature" category = .forms priority = 15 }
override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController? { let document = AssetLoader.writableDocument(for: "Signed Form.pdf", overrideIfExists: false) return PDFViewController(document: document) { // Set `allowDeletingDigitalSignatures` to false to disable removing of added Digital Signatures. $0.allowRemovingDigitalSignatures = false } }
}
This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.