Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

End Content Editing and Save

After completing edits, you can exit editing mode by using endOfEditing with CPDFView to switch out of edit mode. To save the changes, utilize commitEditing to save the modified document.

swift
if pdfView.isEdited() == true {
    DispatchQueue.global().async {
        pdfView.commitEditing()
        DispatchQueue.main.async {
            pdfView.endOfEditing()
        }
    }
}
objective-c
if (pdfView.isEdited) {
        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
            [pdfView commitEditing];
            dispatch_async(dispatch_get_main_queue(), ^{
                [pdfView endOfEditing];
            });
        });
  }