Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub
iOS PDF Library

Important: Read Before Upgrading to 3.0.0

ComPDFKit iOS SDK 3.0.0 includes several breaking API changes. Before building an existing project with this release, review the following changes to avoid compilation failures, annotations not being added to pages, or unexpected Undo/Redo behavior.

  1. Annotation creation and insertion: Replace initWithDocument: with initWithPage:document: and addAnnotation: with updateAndAddAnnotation:. In Swift, use updateAndAdd(_:).
  2. Stamp creation: Use the new dedicated initializers for standard, text, date, and image stamps instead of setting deprecated content properties after initialization.
  3. Widget names: Replace CPDFAnnotationButtonWidget.h and CPDFAnnotationButtonWidget with CPDFButtonWidgetAnnotation.h and CPDFButtonWidgetAnnotation.
  4. Cross-document page insertion: CPDFPage no longer conforms to NSCopying. Replace [page copy] with addPage:atIndex:, or add(_:at:) in Swift.
  5. Annotation copying and Undo/Redo: Copy annotations with copyToPage:. Before deletion, call copyForUndoRestore; restore with copyToPage:, then call releaseUndoRestoreDocument after success.
  6. Annotation notifications: Replace CPDFPageDidAddAnnotationNotification with CPDFPageDidUpdateAnnotationNotification, including the corresponding Swift notification name.
  7. Temporary style annotations: Do not bind temporary annotations to a page when only reading default styles. Doing so can add them to the page and affect Undo/Redo.

Before releasing an app with 3.0.0, search the project for initWithDocument:, addAnnotation, CPDFPageDidAddAnnotation, CPDFAnnotationButtonWidget, [page copy], and CPDFRenderModeMetal. Remove these old usages unless the documentation explicitly identifies an unchanged non-annotation API.

Key Capabilities
Customizable UI
Simple, easy to use, and highly customizable
Low-Level APIs
In Swift or Objective-C for fine-grained control, highly extensibility
High Fidelity
Accurate and reliable PDFium-based rendering engine
Prebuilt Features
Annotate, edit, sign, form fill, redact, and more
Framework Support
ComPDF for iOS is compatible with Flutter, React Native, .NET for iOS, Xamarin.iOS, Ionic, and Cordova.
Free Trial
Unlimited features and projects, professional and timely technical support.
Get Trial Now