---
title: "How to add electronic signatures to PDFs on iOS | Nutrient iOS SDK"
canonical_url: "https://www.nutrient.io/guides/ios/signatures/adding-an-electronic-signature/"
md_url: "https://www.nutrient.io/guides/ios/signatures/adding-an-electronic-signature.md"
last_updated: "2026-05-21T11:22:21.625Z"
description: "Learn how to add electronic signatures to PDFs on iOS using Nutrient iOS SDK. Enable end users to sign documents by drawing, typing, or attaching an image. Follow our step-by-step guide for a seamless signing experience."
---

# How to add electronic signatures to PDFs on iOS

This guide explains how to add an electronic signature (eSignature) to a PDF document on iOS using Nutrient iOS SDK, both through the built-in user interface (UI) and programmatically.

## Adding an electronic signature programmatically

In Nutrient iOS SDK, electronic signatures are implemented as PDF [annotations](https://www.nutrient.io/guides/ios/annotations/introduction-to-annotations.md), commonly referred to as signature annotations.

Electronic signatures can be either ink or image annotations, created with:

- [`InkAnnotation`](https://www.nutrient.io/api/ios/documentation/pspdfkit/inkannotation) for drawn signatures.

- [`StampAnnotation`](https://www.nutrient.io/api/ios/documentation/pspdfkit/stampannotation) for image-based signatures.

To create a signature programmatically:

1. Create an [`InkAnnotation`](https://www.nutrient.io/api/ios/documentation/pspdfkit/inkannotation)/[`StampAnnotation`](https://www.nutrient.io/api/ios/documentation/pspdfkit/stampannotation) instance.

2. Set the `isSignature` property to `true`.

3. Add the annotation to the document using [`addAnnotations(_:options:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/document/add(annotations:options:)).

### Licensing requirements for signature annotations

Creating, updating, and deleting signature annotations requires a license that includes either the **Annotations** component or the **Electronic Signatures** component. If your license includes only the **Electronic Signatures** component (without the **Annotations** component), modifications are restricted to signature annotations exclusively. Any attempt to modify non-signature ink or image annotations (`isSignature` = `false`) or other annotation types will be disallowed.

### Creating an ink signature

To create an ink signature programmatically, use to the following code snippet:

```swift

let document: Document =...

// Create the ink annotation.
let annotation = InkAnnotation()
annotation.color = UIColor(red: 0.667, green: 0.279, blue: 0.748, alpha: 1)
annotation.lineWidth = 3

// Set the stroke data. For example, this would be loaded from end user input on another device.
// This example code is just hardcoding a stroke with three points.
annotation.lines = [
    [CGPoint(x: 50, y: 100), CGPoint(x: 100, y: 200), CGPoint(x: 150, y: 150)],
]

// Mark this ink annotation as a signature.
annotation.isSignature = true

// Add the annotation. By default, it will be added to the first page.
document.add(annotations: [annotation])

```

### Creating an image signature

To create an image signature programmatically, use to the following code snippet:

```swift

let document: Document =...
let signatureImage: UIImage =...

// Create the image annotation. This would be an image of the end user’s signature.
let annotation = StampAnnotation(image: signatureImage)
annotation.boundingBox = CGRect(x: 100, y: 100, width: 100, height: 100)

// Mark this image annotation as a signature.
annotation.isSignature = true

// Add the annotation. By default, it will be added to the first page.
document.add(annotations: [annotation])

```

## Using the built-in UI

If you’re using the SDK with **[Forms](https://www.nutrient.io/guides/ios/forms.md)**, end users can initiate the signature creation modal by tapping a signature form field within the document. If no signature form field is present, end users can manually add a signature using the signature tool button.

If the **Annotations** component is included in your license, the signature tool is accessible within the annotation toolbar.

If the **Annotations** component isn’t included, the signature tool appears directly in the main toolbar by default. You can also add this button using the [`signatureButtonItem`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/signaturebuttonitem) property of [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller).

### Signature creation modal view

When the signature creation modal view is displayed, end users can add a signature using one of three methods:

- **Draw** — End users can create a handwritten signature using a touchscreen or stylus. This method is particularly effective when using devices such as Apple Pencil.

- **Attach an image** — End users can attach an existing signature image from their device.

- **Type** — End users can enter their signature as text using a chosen font style.

End users can attach an existing signature image from their device. If the hardware supports it, they can also capture a photo of their handwritten signature on paper for a digital scan. This option is ideal when signing on a device with easy access to stored files.

End users can enter their name and select from a predefined set of font-based signature styles. This method ensures accessibility and is fully compatible with:

- Screen readers such as VoiceOver, TalkBack, NVDA, and JAWS.

- Assistive technologies such as Switch Control on Mac and iOS.

By default, Nutrient provides four signature styles, and you can customize the available options by defining a list of preferred fonts.

### Color options

For both the **Draw** and **Type** options, end users can choose between black and two shades of blue to ensure the signature remains distinguishable from the document background.
---

## Related pages

- [Save and store electronic signatures on iOS](/guides/ios/signatures/signature-storage.md)
- [eSign PDFs with a Certificate on iOS](/guides/ios/signatures/using-electronic-signatures-and-digital-signatures-together.md)

