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.
Before editing, you should initialize editing mode. ComPDFKit provides methods to initialize editing mode.
The following code shows you how to initialize the editing mode:
// Switch the viewer to the content editing toolbar, which starts the editing mode.
instance.UI.setToolbarGroup('toolbarGroup-EditText');
// Or start the editing mode with the content edit manager only.
await documentViewer.getContentEditManager().startContentEditMode();To add new text, you can switch to a tool called Tools.ToolNames.ADD_PARAGRAPH. For example:
instance.UI.setToolMode(Tools.ToolNames.ADD_PARAGRAPH);You can switch to the Tools.ToolNames.ADD_IMAGE_CONTENT tool.
instance.UI.setToolMode(Tools.ToolNames.ADD_IMAGE_CONTENT);