---
title: "Disable or enable PDF editing on iOS"
canonical_url: "https://www.nutrient.io/guides/ios/features/controlling-pdf-editing/"
md_url: "https://www.nutrient.io/guides/ios/features/controlling-pdf-editing.md"
last_updated: "2026-05-21T13:28:30.009Z"
description: "Control PDF editing with annotations, forms, and feature restrictions in Nutrient iOS SDK. Disable editing, restrict form interactions, and configure document permissions."
---

# Options to disable or enable PDF editing on iOS

Control PDF editing to meet security requirements, protect document integrity, or create appropriate user experiences. Common use cases include distributing read-only contracts, enforcing compliance requirements, and managing workflow-specific editing permissions.

There are several ways to modify PDF documents — for instance, by adding annotations or filling forms. The PDF format has standard restrictions (refer to the [secured documents](https://www.nutrient.io/guides/android/security/secured-documents.md) guide), but in addition to those built-in restrictions, Nutrient gives you control over how to restrict certain modifications of PDF documents.






## Annotations

The following section assumes you’re familiar with annotations. If not, refer to the [annotations overview](https://www.nutrient.io/../../annotations/introduction-to-annotations/) guide.

## Disabling the modification of all annotation types

You can disable all annotation modifications using [`PDFConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration) by setting the [`editableAnnotationTypes`](https://www.nutrient.io/api/android/nutrient/com.pspdfkit.configuration/-pdf-configuration/-builder/editable-annotation-types.html) property to `nil`. This will prevent users from adding new annotations and editing existing ones:

### SWIFT

```swift

let configuration = PDFConfiguration {
	$0.editableAnnotationTypes = nil
}

```

### OBJECTIVE-C

```objc

PSPDFConfiguration *configuration = [PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
	builder.editableAnnotationTypes = nil;
}];

```

## Enabling modifications only for specific annotation types

You can control which annotation types are editable, and you can specify their types in `editableAnnotationTypes`. For example, you can enable only the modification of ink annotations:

### SWIFT

```swift

let configuration = PDFConfiguration {
	$0.editableAnnotationTypes = [.ink]
}

```

### OBJECTIVE-C

```objc

PSPDFConfiguration *configuration = [PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
	builder.editableAnnotationTypes = [NSSet setWithArray:@[PSPDFAnnotationStringInk]]; // Only ink annotations are editable.
}];

```

## Disabling adding new annotations but enabling modification of existing ones

Hiding your [`PDFViewController`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller)’s [`annotationButtonItem`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontroller/annotationbuttonitem) from the toolbar will prevent users from adding new annotations, but it won’t stop them from editing or deleting existing ones:

### SWIFT

```swift

// Notice that `pdfController.annotationButtonItem` isn't included.
pdfController.navigationItem.setRightBarButtonItems([pdfController.thumbnailsButtonItem, pdfController.outlineButtonItem, pdfController.searchButtonItem, pdfController.activityButtonItem], for:.document, animated: false)

```

### OBJECTIVE-C

```objc

// Notice that `pdfController.annotationButtonItem` isn't included.
[pdfController.navigationItem setRightBarButtonItems:@[pdfController.thumbnailsButtonItem, pdfController.outlineButtonItem, pdfController.searchButtonItem, pdfController.activityButtonItem] forViewMode:PSPDFViewModeDocument animated:NO];

```

For more information, refer to the guide on [configuring editable/visible annotation types](https://www.nutrient.io/guides/ios/annotations/disable-rendered-annotation-types.md).

## Disabling the modification of a specific annotation

You can disable the modification of a specific annotation by updating its [`flags`](https://www.nutrient.io/api/ios/documentation/pspdfkit/annotation/flags) property to use [`Annotation.Flag.readOnly`](https://www.nutrient.io/api/ios/documentation/pspdfkit/annotation/flag/readonly). For example:

### SWIFT

```swift

// Update the annotation flags.
annotation.flags.update(with:.readOnly)

```

### OBJECTIVE-C

```objc

// Update the annotation flags.
annotation.flags |= ~PSPDFAnnotationFlagReadOnly;

```

For more information, refer to the guide on [annotation flags](https://www.nutrient.io/guides/ios/annotations/annotation-flags.md).

## Disabling adding annotations using menus

You can add annotations using the menu that shows up when you long press on empty space. This menu contains the **Paste** action and tools for creating different annotations. To disable this menu entirely, set the [`isCreateAnnotationMenuEnabled`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration/iscreateannotationmenuenabled) configuration property to `false`:

```swift

let configuration = PDFConfiguration {
	$0.isCreateAnnotationMenuEnabled = false
}

```

Text markup annotations can also be created by selecting text. For example, when you select text in a document, you can highlight it. To exclude the highlight tool from the text selection menu, use the [`contentMenuConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfconfiguration/contentmenuconfiguration) property:

```swift

let configuration = PDFConfiguration {
    $0.contentMenuConfiguration = ContentMenuConfiguration {
        $0.annotationToolChoices = { _, _, _, defaultChoices in
            defaultChoices.filter { $0!=.highlight }
        }
    }
}

```

To learn more about different menus and how to customize them, refer to our guide on [customizing menus](https://www.nutrient.io/guides/ios/customizing-the-interface/customizing-menus.md).

## Disabling drag and drop

PDFs can be modified using drag and drop. For example, you can drag and drop text, images, and even other PDF documents to create annotations within a document. You can disable drag and drop by configuring your [`DragAndDropConfiguration`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/draganddropconfiguration):

### SWIFT

```swift

let dragAndDropConfiguration = DragAndDropConfiguration {
	$0.acceptedDropTypes = []
	$0.allowedDropTargets = []
}
let configuration = PDFConfiguration {
	$0.dragAndDropConfiguration = dragAndDropConfiguration
}

```

### OBJECTIVE-C

```objc

PSPDFDragAndDropConfiguration *dragAndDropConfiguration = [PSPDFDragAndDropConfiguration configurationWithBuilder:^(PSPDFDragAndDropConfigurationBuilder * builder) {
	builder.acceptedDropTypes = PSPDFDropTypeNone;
	builder.allowedDropTargets = PSPDFDropTargetNone;
}];
PSPDFConfiguration *configuration = [PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
	builder.dragAndDropConfiguration = dragAndDropConfiguration;
}];

```

For more information, refer to the guide on [drag and drop](https://www.nutrient.io/guides/ios/features/drag-and-drop.md).



















## Forms

The following section assumes you’re familiar with forms. If not, refer to the [what are forms?](https://www.nutrient.io/../../forms/introduction-to-forms/) guide.

## Disabling all form interactions

You can disable all form interactions and modifications using `editableAnnotationTypes`:

### SWIFT

```swift

let configuration = PDFConfiguration {
	var editableAnnotationTypes = $0.editableAnnotationTypes
	editableAnnotationTypes?.remove(.widget)
	$0.editableAnnotationTypes = editableAnnotationTypes
}

```

### OBJECTIVE-C

```objc

PSPDFConfiguration *configuration = [PSPDFConfiguration configurationWithBuilder:^(PSPDFConfigurationBuilder *builder) {
	NSMutableSet *editableAnnotationTypes = [builder.editableAnnotationTypes mutableCopy];
	[editableAnnotationTypes removeObject:PSPDFAnnotationStringWidget];
	builder.editableAnnotationTypes = editableAnnotationTypes;
}];

```

If a document has the `DocumentPermissions.annotationsAndForms` or `DocumentPermissions.fillForms` permissions disabled, the SDK prevents form filling automatically. Alternatively, you can set `editableAnnotationTypes` to exclude `.widget` to achieve the same restriction at the application level, regardless of document permissions.

## Disabling specific form element types

You can specify which form elements can be modified. For example, you can disable the modification of all text field form elements and enable all other form elements to be editable:

### SWIFT

```swift

let document = Document(url: documentURL)

// Disable only text field form elements.
for formElement: FormElement in (document.formParser?.forms)! where formElement is TextFieldFormElement {
	formElement.isEditable = false
}

```

### OBJECTIVE-C

```objc

PSPDFDocument *document = [[PSPDFDocument alloc] initWithURL:documentURL];

// Disable only text field form elements.
for (PSPDFFormElement *formElement in document.formParser.forms) {
	if ([formElement isKindOfClass:PSPDFTextFieldFormElement.class]) {
		formElement.editable = NO;
	}
}

```

For a complete list of supported form element types and their corresponding classes, refer to the [form fields](https://www.nutrient.io/../../forms/introduction-to-forms/form-fields/) guide.

### Choosing the right restriction approach

When deciding how to restrict form interactions, consider the following scenarios:

- **Disable all forms** — Use when distributing final documents where no modifications should occur, such as published reports or archived contracts.

- **Disable specific form types** — Use when you need selective editing capabilities, such as allowing signatures while preventing text field changes during approval workflows.

- **Lock individual fields** — Use for workflow stages where some fields are finalized while others remain editable, such as locking approved sections of a multi-stage form.

## Restricting document editing features

PDF documents can be modified using the Document Editor feature, which enables new page creation, page duplication, and the reordering, rotation, or deletion of pages. Refer to the [document editing](https://www.nutrient.io/../../features/document-editor/) guide for implementation steps.
---

## Related pages

- [Adding Custom Views To A Page](/guides/ios/customizing-pdf-pages/adding-custom-views-to-a-page.md)
- [Adding Auxiliary Or Decorative Views](/guides/ios/customizing-pdf-pages/adding-auxiliary-or-decorative-views.md)
- [Document Downloads](/guides/ios/miscellaneous/document-downloads.md)
- [Document Features](/guides/ios/features/document-features.md)
- [Configure document sharing options on iOS](/guides/ios/miscellaneous/document-sharing.md)
- [SwiftUI PDF library](/guides/ios/getting-started/swiftui.md)

