PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF Flutter SDK provides convenient APIs to delete text and image content.
This method is used to delete an edit area (text area, image area, or path area) from a document. It is typically used in conjunction with edit selection events, allowing users to select and delete specific edit content.
Parameters:
editArea: The edit area object to delete, which can be one of the following types: CPDFEditTextArea: Text edit areaCPDFEditImageArea: Image edit areaCPDFEditArea with type == CPDFEditAreaType.path: Path edit areaExample:
// Listen for edit selection events and delete the selected edit area
controller.addEventListener(CPDFEvent.editorSelectionSelected, (event) async {
if (event is CPDFEditArea) {
await document.removeEditArea(event);
}
});
// Directly delete a specified edit area
await document.removeEditArea(editArea);