---
title: "PDF form examples using Swift for iOS"
canonical_url: "https://www.nutrient.io/guides/ios/samples/pdf-forms/"
md_url: "https://www.nutrient.io/guides/ios/samples/pdf-forms.md"
last_updated: "2026-06-08T09:14:14.413Z"
description: "This example shows the various ways you can work with PDF forms — from appearance customization to accessing form field data or working with digital signatures. Get additional resources by visiting our PDF form library for iOS."
---

# PDF form examples using Swift for iOS

This example shows the various ways you can work with PDF forms — from appearance customization to accessing form field data or working with digital signatures. Get additional resources by visiting our [PDF form library for iOS](/guides/ios/forms.md).

[Get Started](https://www.nutrient.io/sdk/ios/getting-started.md)

[All Samples](https://www.nutrient.io/guides/ios/samples.md)

[Download](https://www.nutrient.io/guides/ios/downloads.md)

[Launch Demo](https://www.nutrient.io/demo/)

---

```swift

//
//  Copyright © 2017-2026 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 PSPDFKit
import PSPDFKitUI

// MARK: Digital signing process

@MainActor class FormDigitalSigningExample: Example {

    override init() {
        super.init()
        title = "Digital signing process"
        category =.forms
        priority = 15
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController? {
        let p12URL = AssetLoader.assetURL(for: "John Appleseed Private Key.p12")
        guard let p12data = try? Data(contentsOf: p12URL) else {
            print("Error reading p12 data from \(String(describing: p12URL))")
            self.showAlert(title: "Error reading p12 data file", on: delegate.currentViewController!.navigationController!)
            return nil
        }
        let p12 = PKCS12(data: p12data)
        let signatureManager = SDK.shared.signatureManager
        signatureManager.clearTrustedCertificates()

        // Add certs to trust store for the signature validation process
        let certURL = AssetLoader.assetURL(for: "John Appleseed Public Key.p7c")
        let certData = try? Data(contentsOf: certURL)
        let certificates = try? X509.certificates(fromPKCS7Data: certData!)
        for x509 in certificates! {
            signatureManager.addTrustedCertificate(x509)
        }
        let fileName = "\(UUID().uuidString).pdf"
        let url = URL(fileURLWithPath: NSTemporaryDirectory().appending(fileName))

        Task {
            do {
                let unsignedDocument = AssetLoader.document(for: "Form.pdf")
                let signatureFormElement = unsignedDocument.annotations(at: 0, type: SignatureFormElement.self).first!

                let (certificates, privateKey) = try p12.unlockCertificateChain(withPassword: "test")
                // Use the demo timestamping server endpoint.
                let timestampServerURL = URL(string: "https://tsa.our.services.nutrient-powered.io/")!
                let configuration = SigningConfiguration(dataSigner: privateKey, certificates: certificates, timestampSource: timestampServerURL)
                try await unsignedDocument.sign(formElement: signatureFormElement, configuration: configuration, outputDataProvider: FileDataProvider(fileURL: url))
                delegate.currentViewController?.navigationController?.pushViewController(PDFViewController(document: Document(url: url)), animated: true)
            } catch {
                self.showAlert(title: "Couldn't add signature", message: "\(error)", on: delegate.currentViewController!.navigationController!)
                print(error)
            }
        }
        return nil
    }
}

// MARK: - Digital signing process with custom appearance

@MainActor class FormDigitalSigningExampleCustomAppearanceExample: Example {

    override init() {
        super.init()
        title = "Digital signing process with custom appearance"
        category =.forms
        priority = 16
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController? {
        // Load the private key.
        let p12URL = AssetLoader.assetURL(for: "John Appleseed Private Key.p12")
        guard let p12data = try? Data(contentsOf: p12URL) else {
            print("Error reading p12 data from \(String(describing: p12URL))")
            self.showAlert(title: "Error reading p12 data file", on: delegate.currentViewController!.navigationController!)
            return nil
        }
        let p12 = PKCS12(data: p12data)
        let signatureManager = SDK.shared.signatureManager
        signatureManager.clearTrustedCertificates()

        // Add certs to trust store for the signature validation process
        let certURL = AssetLoader.assetURL(for: "John Appleseed Public Key.p7c")
        let certData = try? Data(contentsOf: certURL)
        let certificates = try? X509.certificates(fromPKCS7Data: certData!)
        for x509 in certificates! {
            signatureManager.addTrustedCertificate(x509)
        }

        // Load the unsigned document to get accurate page info for the custom appearance stream.
        let unsignedDocument = AssetLoader.document(for: "Form.pdf")
        let signatureFormElement = unsignedDocument.annotations(at: 0, type: SignatureFormElement.self).first!

        // Generate a custom PDF that we later use as appearance for the signature.
        let tempPDF = FileHelper.temporaryPDFFileURL(prefix: "appearance")
        let format = UIGraphicsPDFRendererFormat()
        // To fill the signature form element, use the same size.
        let pageRect = CGRect(x: 0, y: 0, width: signatureFormElement.boundingBox.width, height: signatureFormElement.boundingBox.height)
        let renderer = UIGraphicsPDFRenderer(bounds: pageRect, format: format)
        try? renderer.writePDF(to: tempPDF, withActions: { context in
            context.beginPage()

            // draw a gradient
            let colors = [UIColor.systemBlue.cgColor, UIColor.systemTeal.cgColor]
            let colorLocations: [CGFloat] = [0.0, 1.0]
            guard let gradient = CGGradient(colorsSpace: CGColorSpaceCreateDeviceRGB(),
                                            colors: colors as CFArray,
                                            locations: colorLocations) else { return }
            context.cgContext.drawLinearGradient(gradient, start: CGPoint.zero,
                end: CGPoint(x: pageRect.size.width, y: pageRect.size.height),
                options: [])

            // draw text
            let text = "This is a custom PDF apperance"
            text.draw(at: CGPoint(x: 3, y: 3), withAttributes: [
                NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 12)
            ])
        })
        print("Custom apperance stream is stored in \(tempPDF.path)")

        // Create a `PDFSignatureAppearance` that will be used for the signature appearance while signing.
        let appearanceStream = Annotation.AppearanceStream(fileURL: tempPDF)
        let signatureAppearance = PDFSignatureAppearance { builder in
            builder.appearanceMode =.signatureOnly
            builder.signatureWatermark = appearanceStream
        }

        // Create URL for the signed document destination.
        let fileName = "\(UUID().uuidString).pdf"
        let signedDocURL = URL(fileURLWithPath: NSTemporaryDirectory().appending(fileName))

        Task {
            do {
                // Access the private key and certificate for signing.
                let (certificates, privateKey) = try p12.unlockCertificateChain(withPassword: "test")

                // Create the configuration to be used while signing.
                let configuration = SigningConfiguration(dataSigner: privateKey, certificates: certificates, appearance: signatureAppearance, reason: "I agree to the Contract Agreement terms.")

                // Sign the document using the signing configuration and providing the output destination for the signed document.
                try await unsignedDocument.sign(formElement: signatureFormElement, configuration: configuration, outputDataProvider: FileDataProvider(fileURL: signedDocURL))
                delegate.currentViewController?.navigationController?.pushViewController(PDFViewController(document: Document(url: signedDocURL)), animated: true)
            } catch {
                self.showAlert(title: "Couldn't add signature", message: "\(error)", on: delegate.currentViewController!.navigationController!)
                print(error)
            }
        }

        return nil
    }
}

// MARK: - Digital signing process using custom DataSigning

@MainActor class FormCustomDigitalSigningExample: Example {

    override init() {
        super.init()
        title = "Digital signing process using custom signing"
        category =.forms
        priority = 15
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController? {
        let signatureManager = SDK.shared.signatureManager
        signatureManager.clearTrustedCertificates()

        // Add certs to trust store for the signature validation process
        let certURL = AssetLoader.assetURL(for: "John Appleseed Public Key.p7c")
        let certData = try? Data(contentsOf: certURL)
        let publicCertificates = try? X509.certificates(fromPKCS7Data: certData!)
        for x509 in publicCertificates! {
            signatureManager.addTrustedCertificate(x509)
        }
        let fileName = "\(UUID().uuidString).pdf"
        let url = URL(fileURLWithPath: NSTemporaryDirectory().appending(fileName))

        Task {
            do {
                let unsignedDocument = AssetLoader.document(for: "Form.pdf")
                let signatureFormElement = unsignedDocument.annotations(at: 0, type: SignatureFormElement.self).first!

                let customSigner = CustomDataSigner()
                let configuration = SigningConfiguration(dataSigner: customSigner, certificates: publicCertificates!)
                try await unsignedDocument.sign(formElement: signatureFormElement, configuration: configuration, outputDataProvider: FileDataProvider(fileURL: url))
                delegate.currentViewController?.navigationController?.pushViewController(PDFViewController(document: Document(url: url)), animated: true)
            } catch {
                self.showAlert(title: "Couldn't add signature", message: "\(error)", on: delegate.currentViewController!.navigationController!)
                print(error)
            }
        }
        return nil
    }

    private class CustomDataSigner: DataSigning {
        func sign(unsignedData: Data, hashAlgorithm: PDFSignatureHashAlgorithm) async throws -> (signedData: Data, dataFormat: PSPDFKit.SignedDataFormat) {
            // Carry out your custom data signing.
            // We will use a private key here for the sake of this example.
            // However you can use your custom signing implementation that doesn't rely on a private key.
            let p12URL = AssetLoader.assetURL(for: "John Appleseed Private Key.p12")
            let p12data = try Data(contentsOf: p12URL)
            let p12 = PKCS12(data: p12data)
            let (_, privateKey) = try p12.unlockCertificateChain(withPassword: "test")
            return try await privateKey.sign(unsignedData: unsignedData, hashAlgorithm: hashAlgorithm)
        }
    }
}

// MARK: - Programmatic form filling

class FormFillingExample: Example {

    override init() {
        super.init()
        title = "Programmatic Form Filling"
        contentDescription = "Automatically fills out all forms in code."
        category =.forms
        priority = 30
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        let document = AssetLoader.document(for: "Form.pdf")
        document.annotationSaveMode =.disabled

        // Get all form objects and fill them in.
        DispatchQueue.global(qos:.default).async(execute: {() -> Void in
            let formElements = document.annotations(at: 0, type: FormElement.self)
            for formElement in formElements {
                Thread.sleep(forTimeInterval: 0.8)
                // Always update the model on the main thread.
                DispatchQueue.main.async(execute: {() -> Void in
                    if let textFieldElement = formElement as? TextFieldFormElement {
                        let fieldName = textFieldElement.fieldName?? ""
                        if textFieldElement.inputFormat ==.date {
                            textFieldElement.contents = "01/01/2001"
                            // Telephone_Home needs exactly 7 digits
                        } else if fieldName == "Telephone_Home" {
                            textFieldElement.contents = "0123456"
                            // Social Security Number needs exactly 9 digits
                        } else if fieldName == "SSN" {
                            textFieldElement.contents = "012345678"
                            // The other phone numbers need exactly 10 digits
                        } else if fieldName == "Telephone_Work" || fieldName == "Emergency_Phone" {
                            textFieldElement.contents = "0123456789"
                            // All the other form fields don't have any special validation
                        } else {
                            textFieldElement.contents = "Test \(fieldName)"
                        }
                    } else if let buttonElement = formElement as? ButtonFormElement {
                        buttonElement.toggleButtonSelectionState()
                    }
                })
            }
        })
        return FormFillingPDFViewController(document: document)
    }
}

private final class FormFillingPDFViewController: PDFViewController {

    override func commonInit(with document: Document?, configuration: PDFConfiguration) {
        super.commonInit(with: document, configuration: configuration)

        let saveCopy = UIBarButtonItem(title: "Save Copy", style:.plain, target: self, action: #selector(FormFillingPDFViewController.saveCopy(_:)))

        navigationItem.setLeftBarButtonItems([pdfController.closeButtonItem, saveCopy], animated: false)
    }

    @objc
    private func saveCopy(_ sender: UIBarButtonItem) {
        // Create a copy of the document
        let tempURL = FileHelper.temporaryPDFFileURL(prefix: "copy_\(document?.fileURL?.lastPathComponent?? "Form")")
        guard let documentURL = document?.fileURL else { return }
        try? FileManager.default.copyItem(at: documentURL, to: tempURL)

        // Transfer form values
        let documentCopy = Document(url: tempURL)
        let annotations = document?.annotations(at: 0, type: FormElement.self)
        let annotationsCopy = documentCopy.annotations(at: 0, type: FormElement.self)
        assert(annotations?.count == annotationsCopy.count, "This example is built to only fill forms - don't add/remove annotations.")
        for (index, formElement) in (annotationsCopy.enumerated()) {
            formElement.contents = annotations?[index].contents
        }
        try? documentCopy.save()
        guard let path = documentCopy.fileURL?.path else { return }
        let alert = UIAlertController(title: "Success", message: "Document copy saved to \(path)", preferredStyle:.alert)
        alert.addAction(UIAlertAction(title: "Dismiss", style:.default))
        self.present(alert, animated: true, completion: nil)
    }
}

// MARK: - Interactive Form with a digital signature

class FormDigitallySignedModifiedExample: Example {

    override init() {
        super.init()
        title = "Example of an Interactive Form with a Digital Signature"
        category =.forms
        priority = 10
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        let document = AssetLoader.document(for: "Signed Form.pdf")

        // check if document is signed.
        if let signatureElement = document.annotations(at: 0, type: SignatureFormElement.self).first {
            print("Document is signed: \(signatureElement.isSigned) info: \(String(describing: signatureElement.signatureInfo))")
        }

        return PDFViewController(document: document)
    }
}

// MARK: - Form with formatted text fields

class FormWithFormattingExample: Example {

    override init() {
        super.init()
        title = "PDF Form with formatted text fields"
        category =.forms
        priority = 50
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        let document = AssetLoader.document(for: "Formatted Form Fields.pdf")
        return PDFViewController(document: document)
    }
}

// MARK: - Read-only form

class FormWithFormattingReadonlyExample: Example {

    override init() {
        super.init()
        title = "Readonly Form"
        category =.forms
        priority = 51
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        let document = AssetLoader.document(for: "Formatted Form Fields.pdf")
        return PDFViewController(document: document) {
            var editableAnnotationTypes = $0.editableAnnotationTypes
            editableAnnotationTypes?.remove(.widget)
            $0.editableAnnotationTypes = editableAnnotationTypes
        }
    }
}

// MARK: - Programmatically fill form and save

class FormFillingAndSavingExample: Example {

    override init() {
        super.init()
        title = "Programmatically fill form and save"
        category =.forms
        priority = 150
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        // Get the example form and copy it to a writable location.
        let document = AssetLoader.writableDocument(for: "Form.pdf", overrideIfExists: true)
        document.annotationSaveMode =.embedded

        for formElement: FormElement in (document.formParser?.forms)! {
            if formElement is ButtonFormElement {
                (formElement as? ButtonFormElement)?.select()
            } else if formElement is ChoiceFormElement {
                (formElement as? ChoiceFormElement)?.selectedIndices = NSIndexSet(index: 1) as IndexSet
            } else if formElement is TextFieldFormElement {
                formElement.contents = "Test"
            }
        }

        document.save { result in
            switch result {
            case.failure(let error):
                print("Error while saving: \(String(describing: error.localizedDescription))")

            case.success:
                print("File saved correctly to \(document.fileURL!.path)")
            }
        }

        return PDFViewController(document: document)
    }
}

// MARK: - Programmatically create a text form field

class FormCreationExample: Example {

    override init() {
        super.init()
        title = "Programmatically create a text form field"
        category =.forms
        priority = 160
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        // Get the example form and copy it to a writable location.
        let document = AssetLoader.writableDocument(for: "Form.pdf", overrideIfExists: true)
        document.annotationSaveMode =.embedded

        // Create a new text field form element.
        let textFieldFormElement = TextFieldFormElement()
        textFieldFormElement.boundingBox = CGRect(x: 200, y: 100, width: 200, height: 20)
        textFieldFormElement.pageIndex = 0

        // Insert a form field for the form element. It will automatically be added to the document.
        let textFormField = try! TextFormField.insertedTextField(withFullyQualifiedName: "name", documentProvider: document.documentProviders.first!, formElement: textFieldFormElement)
        print("Text form field created successfully: \(textFormField)")

        return PDFViewController(document: document)
    }
}

// MARK: - Programmatically reset some fields of a form PDF

class FormResetExample: Example {

    override init() {
        super.init()
        title = "Programmatically reset some fields of a form PDF"
        category =.forms
        priority = 160
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        // Get the example form and copy it to a writable location.
        let document = AssetLoader.writableDocument(for: "Form.pdf", overrideIfExists: true)
        document.annotationSaveMode =.embedded

        let lastNameField = document.formParser?.findField(withFullFieldName: "Last Name")
        if lastNameField!= nil {
            lastNameField!.value = "Appleseed"
        }
        let firstNameField = document.formParser?.findField(withFullFieldName: "First Name")
        if firstNameField!= nil {
            firstNameField!.value = "John"
        }
        if let checkBox = document.formParser?.findField(withFullFieldName: "HIGH SCHOOL DIPLOMA") as? ButtonFormField {
            checkBox.toggleButton(checkBox.annotations.first!)
        }
        // This should reset "High School Diploma" to default (unchecked), but "First name" and "Last name" keep their modified values.
        try! document.formParser?.resetForm([lastNameField!, firstNameField!], withFlags:.includeExclude)

        return PDFViewController(document: document)
    }
}

// MARK: - Programmatically create a push button form field with a custom image

class PushButtonCreationExample: Example {

    override init() {
        super.init()
        title = "Programmatically create a push button form field with a custom image"
        category =.forms
        priority = 170
    }

    override func invoke(with delegate: ExampleRunnerDelegate) -> UIViewController {
        // Get the example form and copy it to a writable location.
        let document = AssetLoader.writableDocument(for: "Form.pdf", overrideIfExists: true)
        document.annotationSaveMode =.disabled

        // Create a push button and position them in the document.
        let pushButtonFormElement = ButtonFormElement()
        pushButtonFormElement.boundingBox = CGRect(x: 20, y: 200, width: 100, height: 83)
        pushButtonFormElement.pageIndex = 0

        // Add a URL action.
        pushButtonFormElement.action = URLAction(urlString: "https://www.nutrient.io/")

        // Create a new appearance characteristics and set its normal icon.
        let appearanceCharacteristics = AppearanceCharacteristics()
        appearanceCharacteristics.normalIcon = UIImage(named: "exampleimage.jpg")
        pushButtonFormElement.appearanceCharacteristics = appearanceCharacteristics

        // Insert a form field for the form element. It will automatically be added to the document.
        let pushButtonFormField = try! ButtonFormField.insertedButtonField(with:.pushButton, fullyQualifiedName: "PushButton", documentProvider: document.documentProviders.first!, formElements: [pushButtonFormElement], buttonValues: ["PushButton"])
        print("Button form field created successfully: \(pushButtonFormField)")

        return PDFViewController(document: document)
    }
}

fileprivate extension Example {

   func showAlert(title: String? = nil, message: String? = nil, on viewController: UIViewController) {
        let alertController = UIAlertController(title: title, message: message, preferredStyle:.alert)
        alertController.addAction(UIAlertAction(title: "OK", style:.cancel))
        viewController.present(alertController, animated: true)
    }
}

```

This code sample is an example that illustrates how to use our SDK. Please adapt it to your specific use case.

---

## Related pages

- [Allow freeform image annotation resizing in Swift for iOS](/guides/ios/samples/freeform-image-resize.md)
- [Creating effective link annotations on iOS](/guides/ios/samples/annotations.md)
- [Add file annotation to PDF in Swift for iOS](/guides/ios/samples/add-file-annotation-with-embedded-file.md)
- [Image annotations in Swift for iOS](/guides/ios/samples/annotate-images.md)
- [Add an Apple Maps widget to a PDF page in Swift for iOS](/guides/ios/samples/add-map-widget-to-pdf.md)
- [Add video annotation to PDF in Swift for iOS](/guides/ios/samples/add-video-annotation-to-pdf.md)
- [Add annotation buttons to PDF toolbar in Swift for iOS](/guides/ios/samples/annotation-buttons-in-navigation-bar.md)
- [Create an always-dark annotation toolbar in Swift for iOS](/guides/ios/samples/always-dark-annotation-toolbar.md)
- [Create a custom appearance stream generator in Swift for iOS](/guides/ios/samples/appearance-stream-generator.md)
- [Select PDF text and create a note in Swift for iOS](/guides/ios/samples/create-note-from-selection.md)
- [Maintain annotation aspect ratio in Swift](/guides/ios/samples/aspect-ratio-conserving-resizing.md)
- [Write PDF annotations to XFDF in Swift for iOS](/guides/ios/samples/annotations-to-xfdf.md)
- [Embed Nutrient as a child view controller in Swift for iOS](/guides/ios/samples/child-view-controller-using-parent-navigation-bar.md)
- [PDFViewController controller state in Swift for iOS](/guides/ios/samples/controller-state.md)
- [Enable auto-save in PDF using Swift for iOS](/guides/ios/samples/auto-saving-pdf.md)
- [Blur PDF page in Swift for iOS](/guides/ios/samples/blur-pdf-pages.md)
- [Create link annotations in PDF using Swift for iOS](/guides/ios/samples/create-link-annotation-in-pdf.md)
- [Create PDF bookmark with UI in Swift for iOS](/guides/ios/samples/create-pdf-bookmark-name-ui.md)
- [Custom PDF stamp annotation in Swift for iOS](/guides/ios/samples/custom-pdf-stamp-annotations.md)
- [Add custom font sizes to free text keyboard in Swift for iOS](/guides/ios/samples/custom-buttons-free-text-keyboard-toolbar.md)
- [Customize blend modes in stamp annotations in Swift for iOS](/guides/ios/samples/annotation-inspector-stamp-blend-mode.md)
- [Add a custom free text input accessory in Swift for iOS](/guides/ios/samples/custom-free-text-input-accessory.md)
- [Create password-protected PDF in Swift for iOS](/guides/ios/samples/create-password-protected-pdf.md)
- [Custom Comments Ui](/guides/ios/samples/custom-comments-ui.md)
- [Customize PDF tab titles in Swift for iOS](/guides/ios/samples/custom-tabbed-bar-title.md)
- [Customize PDF annotation toolbar in Swift for iOS](/guides/ios/samples/customize-pdf-annotation-toolbar.md)
- [Customize PDF sharing options in Swift for iOS](/guides/ios/samples/custom-pdf-sharing-options.md)
- [Custom thumbnail PDF view filter in Swift for iOS](/guides/ios/samples/custom-thumbnail-view-controller-filter.md)
- [Customize pencil interactions on PDF using Swift for iOS](/guides/ios/samples/custom-pencil-interaction-action.md)
- [Customize PDF outline in Swift for iOS](/guides/ios/samples/custom-pdf-outline-controller.md)
- [Customize the search result cell in Swift for iOS](/guides/ios/samples/custom-search-result-cell.md)
- [Customize the PDF search highlight color in Swift for iOS](/guides/ios/samples/custom-search-highlight-color.md)
- [Disable bookmark editing in PDF using Swift for iOS](/guides/ios/samples/disable-bookmark-editing.md)
- [Present a confirmation sheet for iOS annotations](/guides/ios/samples/confirm-annotation-deletion.md)
- [Continiously create free text annotations in Swift for iOS](/guides/ios/samples/create-free-text-annotations-continuously.md)
- [Add calculator to PDF using JavaScript on iOS](/guides/ios/samples/calculator.md)
- [Customize the filename of shared PDF in Swift for iOS](/guides/ios/samples/custom-sharing-filenames.md)
- [Disable annotations reviews in PDF using Swift for iOS](/guides/ios/samples/disable-annotation-reviews.md)
- [Customized note annotation view controller in Swift for iOS](/guides/ios/samples/customized-note-annotation-view-controller.md)
- [How to disable digital signature removal in PDFs](/guides/ios/samples/disable-removing-digital-signature.md)
- [Use a custom image picker controller in Swift for iOS](/guides/ios/samples/custom-image-picker-controller.md)
- [Custom Thumbnail Page Label](/guides/ios/samples/custom-thumbnail-page-label.md)
- [Implement a Document Picker sidebar in Swift for iOS](/guides/ios/samples/document-picker-sidebar.md)
- [Initialize a PDF with data in Swift for iOS](/guides/ios/samples/document-data-provider-pdf-from-data.md)
- [Disable scroll bouncing in PDF using Swift for iOS](/guides/ios/samples/disable-scroll-bouncing.md)
- [Asynchronously sign PDF in Swift for iOS](/guides/ios/samples/asynchronous-digital-signature-in-pdf.md)
- [Using a custom annotation provider in Swift for iOS](/guides/ios/samples/annotation-provider-with-rotation.md)
- [Add text annotation to PDF in Swift for iOS](/guides/ios/samples/add-text-annotation-to-pdf.md)
- [Embed, flatten, or remove PDF annotations in Swift for iOS](/guides/ios/samples/annotation-processing.md)
- [Prepare PDF to embed PAdES digital signature in Swift for iOS](/guides/ios/samples/contained-pades-digital-signature.md)
- [Prepare PDF to capture digital signature in Swift for iOS](/guides/ios/samples/contained-digital-signatures.md)
- [Customize the annotation selection knobs in Swift for iOS](/guides/ios/samples/custom-selection-knobs.md)
- [Customize the annotations list in Swift for iOS](/guides/ios/samples/customizing-annotation-list.md)
- [Customize PDF form appearance in Swift for iOS](/guides/ios/samples/customizing-pdf-form-appearance.md)
- [Customize vertical annotation toolbar in Swift for iOS](/guides/ios/samples/custom-vertical-annotation-toolbar.md)
- [Apply XFDF annotations and save it as new PDF in Swift for iOS](/guides/ios/samples/embedded-xfdf-annotation-provider.md)
- [Exit PDF drawing mode automatically in Swift for iOS](/guides/ios/samples/exit-drawing-mode-automatically.md)
- [Add video, audio, image annotation to PDF in Swift for iOS](/guides/ios/samples/gallery.md)
- [Create PDF programmatically in Swift for iOS](/guides/ios/samples/create-pdf-programmatically.md)
- [Encrypt and decrypt a PDF using Swift for iOS](/guides/ios/samples/encrypt-decrypt-pdf.md)
- [PDF highlight annotation blend mode menu in Swift for iOS](/guides/ios/samples/highlight-annotation-blend-mode-menu.md)
- [Fixed-sized PDF stamp annotations in Swift for iOS](/guides/ios/samples/floating-pdf-stamp-annotation.md)
- [Disable bookmark renaming in PDF using Swift for iOS](/guides/ios/samples/disable-bookmark-renaming.md)
- [Customize PDF page lables in Swift for iOS](/guides/ios/samples/custom-page-label.md)
- [Customize annotation link border color in Swift for iOS](/guides/ios/samples/custom-link-border-color.md)
- [Save reading position in PDF using Swift for iOS](/guides/ios/samples/document-view-state-restoration.md)
- [Document With Original Url Set](/guides/ios/samples/document-with-original-url-set.md)
- [Add analytics to PDF components in Swift for iOS](/guides/ios/samples/analytics.md)
- [Display PDF in inbox directory using Swift for iOS](/guides/ios/samples/display-pdf-inbox.md)
- [Add watermark to all PDF pages using Swift for iOS](/guides/ios/samples/draw-watermark-on-pdf-pages.md)
- [Collaborating on PDFs in board meetings using Swift for iOS](/guides/ios/samples/board-meeting.md)
- [Generate a PDF report using Swift for iOS](/guides/ios/samples/generate-pdf-report.md)
- [Draw all PDF annotations as overlays in Swift for iOS](/guides/ios/samples/draw-annotations-as-overlay.md)
- [Clear all PDF annotations with a button in Swift for iOS](/guides/ios/samples/custom-button-in-annotation-toolbar.md)
- [Face redaction in document using Swift for iOS](/guides/ios/samples/face-redaction-in-pdf.md)
- [Custom PDF bookmark provider in Swift for iOS](/guides/ios/samples/custom-pdf-bookmark-provider.md)
- [Customize PDF view margins using Swift for iOS](/guides/ios/samples/dynamic-margins.md)
- [Disable PDF annotation editing in Swift for iOS](/guides/ios/samples/disable-annotation-editing.md)
- [LMS example: Take and grade an exam using Swift for iOS](/guides/ios/samples/e-learning.md)
- [Encrypted Xfdf Annotation Provider](/guides/ios/samples/encrypted-xfdf-annotation-provider.md)
- [Enable fixed PDF toolbar position in Swift for iOS](/guides/ios/samples/top-toolbar-position.md)
- [Add image gallery to PDF in Swift for iOS](/guides/ios/samples/add-image-gallery-to-pdf.md)
- [Add a custom cloudy rectangle annotation to a PDF in Swift for iOS](/guides/ios/samples/add-custom-cloudy-rectangle.md)
- [Encrypt disk cache when rendering PDF in Swift for iOS](/guides/ios/samples/encrypted-cache.md)
- [Update configuration when rotating PDF in Swift for iOS](/guides/ios/samples/update-configuration-when-rotating.md)
- [Monitor UI touches using Swift for iOS](/guides/ios/samples/monitor-touches.md)
- [Add an image signature to PDF in Swift for iOS](/guides/ios/samples/add-image-signature-to-pdf-programmatically.md)
- [Add overlay views to PDF in Swift for iOS](/guides/ios/samples/overlay-views.md)
- [Insert page into PDF from another document in Swift for iOS](/guides/ios/samples/insert-pdf-page-from-document.md)
- [Customize comment font size in PDF using Swift for iOS](/guides/ios/samples/large-font-for-comments.md)
- [Password Not Preset](/guides/ios/samples/password-not-preset.md)
- [Add a bottom inset to the user interface in Swift for iOS](/guides/ios/samples/inset-user-interface.md)
- [Custom saving options after editing PDF in Swift for iOS](/guides/ios/samples/pdf-editor-custom-saving-confirmation.md)
- [Getting started with iOS playground](/guides/ios/samples/playground.md)
- [Create PDF teleprompter using Swift for iOS](/guides/ios/samples/pdf-teleprompter.md)
- [Printer defaults for PDF annotations in Swift for iOS](/guides/ios/samples/printer-defaults.md)
- [PDF reflow with Reader View in Swift for iOS](/guides/ios/samples/pdf-reader-view.md)
- [Configuring multiline titles in PDF using Swift for iOS](/guides/ios/samples/multiline-pdf-title.md)
- [Display PDFViewController in popover using Swift for iOS](/guides/ios/samples/popover-presentation.md)
- [Embed PDFViewController as a child in iOS](/guides/ios/samples/child-view-controller.md)
- [Highlight text in PDF using Swift for iOS](/guides/ios/samples/highlight-text-in-pdf.md)
- [Lazy load PDF annotations in Swift for iOS](/guides/ios/samples/lazy-load-pdf-annotations.md)
- [Configuring PDF reader in Swift for iOS](/guides/ios/samples/e-reader.md)
- [Show PDF download progress in Swift for iOS](/guides/ios/samples/pdf-download-progress.md)
- [Custom annotation provider in Swift for iOS](/guides/ios/samples/custom-annotation-provider.md)
- [PDF page scale and resize using Swift for iOS](/guides/ios/samples/pdf-page-scaling.md)
- [Add copyright watermark to PDF in Swift for iOS](/guides/ios/samples/add-copyright-watermark-to-pdf.md)
- [Programmatically go to PDF outline in Swift for iOS](/guides/ios/samples/programmatically-go-to-outline.md)
- [Enable saving confirmation when exiting PDF in Swift for iOS](/guides/ios/samples/save-confirmation.md)
- [Customize iOS annotation inspector color presets](/guides/ios/samples/preset-customization.md)
- [Programmatically edit PDFs using Swift for iOS](/guides/ios/samples/programmatic-pdf-editing.md)
- [Open PDF with preset password using Swift for iOS](/guides/ios/samples/preset-pdf-passwords.md)
- [Convert HTML to PDF using Swift for iOS](/guides/ios/samples/html-to-pdf.md)
- [Programtically search a PDF using Swift for iOS](/guides/ios/samples/search-without-controller.md)
- [Simplifying the font picker for text annotation using Swift for iOS](/guides/ios/samples/simple-font-picker.md)
- [Show note controller for highlights in Swift for iOS](/guides/ios/samples/show-note-controller-for-highlights.md)
- [Rotate PDF pages with Swift](/guides/ios/samples/rotate-page-temporarily.md)
- [Customize scrubber bar with buttons using Swift for iOS](/guides/ios/samples/scrubber-bar-with-buttons.md)
- [Redact text in PDF using Swift for iOS](/guides/ios/samples/pdf-redaction.md)
- [Select free text annotation in PDF using Swift for iOS](/guides/ios/samples/select-free-text-annotations.md)
- [Convert stamp into a PDF button in Swift for iOS](/guides/ios/samples/stamp-button.md)
- [Create a custom PDF navigation bar with SwiftUI for iOS](/guides/ios/samples/swiftui-custom-navigation-bar.md)
- [Show or hide PDF annotations using Swift for iOS](/guides/ios/samples/toggle-annotation-visibility.md)
- [Toggle PDF form field highlight color in Swift for iOS](/guides/ios/samples/pdf-form-highlight-color.md)
- [Search multiple PDF files using Swift for iOS](/guides/ios/samples/search-multiple-pdf-files.md)
- [Download PDF from URL using Swift for iOS](/guides/ios/samples/remote-document-url.md)
- [Customize view controller for screen mirroring in Swift for iOS](/guides/ios/samples/screen-mirroring.md)
- [Custom PDF page labels in the sharing UI in Swift for iOS](/guides/ios/samples/page-labels-in-sharing-ui.md)
- [Simplifying the annotation inspector using Swift for iOS](/guides/ios/samples/simple-annotation-inspector.md)
- [SwiftUI split screen: Display two PDF views side by side on iOS](/guides/ios/samples/swiftui-split-screen.md)
- [Embed a SwiftUI view inside a page view on iOS](/guides/ios/samples/swiftui-on-page-view.md)
- [Customize PDF editor toolbar using Swift for iOS](/guides/ios/samples/pdf-editor-toolbar-customization.md)
- [Rotate PDF page using Swift for iOS](/guides/ios/samples/rotate-pdf-page.md)
- [Remove password from PDF using Swift for iOS](/guides/ios/samples/remove-pdf-password.md)
- [Custom page template in PDF editor using Swift for iOS](/guides/ios/samples/pdf-editor-custom-templates.md)
- [Open AES-encrypted PDF in Swift for iOS](/guides/ios/samples/open-aes-encrypted-pdf.md)
- [Show multiple files as a single PDF using Swift for iOS](/guides/ios/samples/show-multiple-files-in-pdf.md)
- [Render drawings on PDF pages using Swift for iOS](/guides/ios/samples/pdf-page-drawing.md)
- [Use PDFViewController with SwiftUI for iOS](/guides/ios/samples/swiftui.md)
- [Customize PDF view settings in Swift for iOS](/guides/ios/samples/pdf-view-settings.md)
- [Select all text in a PDF using Swift for iOS](/guides/ios/samples/select-all-pdf-text.md)
- [Link annotation view customization in Swift for iOS](/guides/ios/samples/link-annotation-view-customization.md)
- [Aviation example: Displaying flight plan PDF in Swift for iOS](/guides/ios/samples/aviation.md)
- [Display building floor plans in iOS with Swift](/guides/ios/samples/construction.md)
- [Multi-user PDF collaboration using Swift for iOS](/guides/ios/samples/multi-user-pdf-collaboration.md)
- [Programatically create PDF annotations in Swift for iOS](/guides/ios/samples/add-annotations-to-pdf-programmatically.md)
- [Convert MS Office (DOCX, XLSX, PPTX) to PDF in Swift for iOS](/guides/ios/samples/office-to-pdf-conversion.md)
- [OCR PDF using Swift for iOS](/guides/ios/samples/ocr-pdf.md)
- [Import and export annotations in XFDF using Swift for iOS](/guides/ios/samples/xfdf-annotation-provider.md)
- [Search and redact text in a PDF using Swift for iOS](/guides/ios/samples/search-and-redact-pdf-text.md)
- [Configure PDF annotation toolbar using Swift for iOS](/guides/ios/samples/manual-toolbar-setup.md)
- [Show author name on annotation selection in Swift for iOS](/guides/ios/samples/show-author-name-on-annotation-selection.md)
- [Programmatically add a signature to all PDF pages using Swift for iOS](/guides/ios/samples/sign-all-pdf-pages.md)
- [Compare PDF documents using Swift for iOS](/guides/ios/samples/pdf-document-comparison.md)
- [PDF streaming using Swift for iOS](/guides/ios/samples/streaming-pdf.md)
- [PDF streaming with SwiftUI for iOS](/guides/ios/samples/streaming-pdf-swiftui.md)
- [PDF collaboration using Swift for iOS](/guides/ios/samples/pdf-collaboration.md)
- [Create a custom PDF page setting view in SwiftUI for iOS](/guides/ios/samples/swiftui-settings.md)
- [Sticky header for PDF thumbnail view in Swift for iOS](/guides/ios/samples/sticky-header.md)
- [Customize PDF annotation toolbar with SwiftUI for iOS](/guides/ios/samples/swiftui-annotationt-toolbar.md)
- [Cycle through PDF documents using Swift for iOS](/guides/ios/samples/page-view-controller.md)
- [PDF magazine reader using Swift for iOS](/guides/ios/samples/pdf-magazine-reader.md)
- [Show multiple PDFs with tabbed UI using Swift for iOS](/guides/ios/samples/tabbed-bar.md)
- [Custom annotation inspector with SwiftUI for iOS](/guides/ios/samples/swiftui-custom-annotation-inspector.md)
- [Store PDF annotations for multiple users in Swift for iOS](/guides/ios/samples/store-multiple-user-annotations.md)
- [Auto-save PDF annotation changes in Swift for iOS](/guides/ios/samples/save-as-pdf.md)
- [Persist view settings using Swift for iOS](/guides/ios/samples/persist-view-settings.md)
- [Swiftui Sharing](/guides/ios/samples/swiftui-sharing.md)
- [Create email snippet when sharing PDF in Swift for iOS](/guides/ios/samples/predefined-email-body.md)
- [Display measurements on PDF pages or spreads in Swift for iOS](/guides/ios/samples/measurements-on-pages-spreads.md)
- [Add a snake game inside a PDF in Swift for iOS](/guides/ios/samples/snake.md)
- [Using Instant JSON to collaborate on PDFs in Swift for iOS](/guides/ios/samples/instant-json.md)
- [Hide or reveal an area in a PDF using Swift for iOS](/guides/ios/samples/hide-reveal-area-in-pdf.md)
- [PDF text redaction using regex in Swift for iOS](/guides/ios/samples/redact-pdf-text-using-regex.md)
- [Add SwiftUI sidebar next to PDF view on iOS](/guides/ios/samples/swiftui-sidebar.md)
- [Integrate UIStoryboard with PDFViewController in Swift for iOS](/guides/ios/samples/storyboard.md)
- [Display PDF annotations on layers in Swift for iOS](/guides/ios/samples/pdf-annotation-layers.md)

