Some test text!

menu
Sign a documentkeyboard_arrow_down

Sign a PDF document on iOS

To sign an existing approval signature field in a PDF Document:

// Open an existing PDF
PTPDFDoc* doc = [[PTPDFDoc alloc] initWithFilepath: docpath];

// Retrieve the unsigned approval signature field.
PTField* found_approval_field = [doc GetField: approval_field_name];
PTDigitalSignatureField* approval_digsig_field = [[PTDigitalSignatureField alloc] initWithIn_field: found_approval_field];

// (OPTIONAL) Add more information to the signature dictionary.
[approval_digsig_field SetLocation: @"Vancouver, BC"];
[approval_digsig_field SetReason: @"Document approval."];
[approval_digsig_field SetContactInfo: @"www.pdftron.com"];

// (OPTIONAL) Add an appearance to the signature field.
PTImage* img = [PTImage CreateWithFile: [doc GetSDFDoc] filename: appearance_img_path encoder_hints: [[PTObj alloc]init]];
PTSignatureWidget* approval_signature_widget = [[PTSignatureWidget alloc] initWithD: [found_approval_field GetSDFObj]];
[approval_signature_widget CreateSignatureAppearance: img];

// Prepare the signature and signature handler for signing.
[approval_digsig_field SignOnNextSave: private_key_file_path in_password: keyfile_password];

// The actual approval signing will be done during the following incremental save operation.
[doc SaveToFile: outpath flags: e_ptincremental];

Digitally sign PDF files
Full code sample which demonstrates using the digital signature API to digitally sign and/or certify PDF documents.

linkAbout Adding An Approval Signature to a PDF Document

The PDFTron SDK enables approval signatures in PDF documents using a Digital Certificate, in accordance with the latest PDF specification. By leveraging public key infrastructure (PKI) technology, with a certificate issued by a trusted certificate authority (CA), a signer can use a certificate-based digital ID to guarantee the authenticity of a signature. Placement of a digital signature using a certificate can also guarantee that a document was not modified since the signature was placed, ensuring the authenticity of the document.

Above is an example of a document containing a certified signature, guaranteed by a certificate generated by PDFTron.com.

Get the answers you need: Support

close

Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.