Skip to content
ComPDF
DemoFAQ
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.

Guides

Setting Edit Types

Once in content editing mode, developers can control which elements users are allowed to edit:

  • Text Editing: Add, delete, or modify text content in the PDF.
  • Image Editing: Insert, replace, or delete images in the PDF.
  • Path Editing: Modify vector paths such as lines or shapes.

Toolbar Switch

Users can switch edit types using the bottom toolbar.

API Switch

If the toolbar is hidden, you can use the API:

dart
// Enable only text editing
controller.editManager.changeEditType([CPDFEditType.text]);

// Enable both text and image editing
controller.editManager.changeEditType([CPDFEditType.text, CPDFEditType.image]);

// Disable all editing (read-only)
controller.editManager.changeEditType([CPDFEditType.none]);