PSPDFDigitalSignatureCoordinator
Objective-C
@interface PSPDFDigitalSignatureCoordinator : NSObject <PSPDFOverridable>
Swift
class DigitalSignatureCoordinator : NSObject, Overridable
The digital signature coordinator handles signing and presenting a digitally signed document. Signing a document with a certificate creates a readonly copy, as the file has to be completely re-written.
Note
Depending on your application logic you will want to choose where to store this new file. PSPDFKit suggests a randomized temporary folder + file name as default location.Register your subclass via overrideClass:withClass: on the configuration object. Don’t instantiate an object of this class yourself.
-
Unavailable
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_EMPTY_INIT_UNAVAILABLE
-
Unavailable
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_EMPTY_INIT_UNAVAILABLE
-
Path that is used for storing the newly created document, which will be digitally signed.
Note
fileName
is a suggestion based on the title of the original document, which can be used in the path. The path will be sanitized, and it will me made sure that the suffix is .pdf.Declaration
Objective-C
- (nonnull NSString *)pathForDigitallySignedDocumentFromOriginalDocument: (nonnull PSPDFDocument *)document suggestedFileName: (nonnull NSString *) fileName;
Swift
func pathForDigitallySignedDocument(fromOriginalDocument document: Document, suggestedFileName fileName: String) -> String
-
Present the digitally signed document, containing the signature on
pageIndex
.Declaration
Objective-C
- (void)presentSignedDocument:(nonnull PSPDFDocument *)signedDocument showingPageIndex:(PSPDFPageIndex)pageIndex withPresentationContext: (nonnull id<PSPDFPresentationContext>)presentationContext;
Swift
func presentSignedDocument(_ signedDocument: Document, showingPageIndex pageIndex: PageIndex, with presentationContext: PresentationContext)
Parameters
signedDocument
The newly created document containing the digital signature.
pageIndex
The page index the digital signature is on. You can use this to scroll to this page when presenting the new document.
presentationContext
A presentation context that can be used to present the new document to. Usually the
PDFViewController
that initiated the digital signing process. -
Subclassing hook that can be used to configure the signature appearance.
Note
If an ink signature has lines set, thesignatureGraphic
will be preconfigured.Declaration
Objective-C
- (void) configureSignatureAppearanceWithBuilder: (nonnull PSPDFSignatureAppearanceBuilder *)builder document:(nonnull PSPDFDocument *)document signature:(nonnull PSPDFSignatureContainer *) signature;
Swift
func configureSignatureAppearance(with builder: PSPDFSignatureAppearanceBuilder, document: Document, signature: SignatureContainer)