On this page
Guides
Initialize Editing Mode
Before performing PDF content editing, you should initialize the content editing mode.
This example shows how to initialize editing mode:
C#
CPDFDocument doc = CPDFDocument.InitWithFilePath("filePath");
CPDFViewerTool tool = new CPDFViewerTool();
tool.GetCPDFViewer().InitDoc(doc);
CPDFToolManager toolManager = new CPDFToolManager(tool);
toolManager.SetToolType(ToolType.ContentEdit);
tool.SetCurrentEditType(CPDFEditType.EditText | CPDFEditType.EditImage | CPDFEditType.EditPath);
Explanation of Editing Mode
Here is the explanation of the editing mode settings:
Editing Mode | Description | Parameters |
---|---|---|
Text Mode | In text mode, the text blocks surrounded by dotted lines will be displayed in the PDF document. Users can select text blocks and add, delete, copy, and paste text. | CPDFEditType.EditText |
Image Mode | In image mode, the images surrounded by dotted lines will be displayed in the PDF document. Users can select images and then delete, crop, rotate, mirror, replace, save images, or set image properties. | CPDFEditType.EditImage |
Path Mode | In path mode, the path in the PDF document can be selected, which can be cut, copied, moved, deleted, and so on. | CPDFEditType.EditPath |
Text & Image & Path Mode | In text, image and path mode, the text blocks and images surrounded by dotted lines will be displayed in the PDF document. Users can select and edit both text, images and path. | CPDFEditType.EditText|CPDFEditType.EditImage|CPDFEditType.EditPath |