PDF editing provides the ability to change content so that its data can be improved or re-purposed.
- Create, move, or delete text and images.
- Edit text and images properties.
- Undo or redo any change.
When editing PDF, other operations are not supported like adding or deleting annotations, adding watermarks, modifying form properties, etc.
PDF editing supports the following editing modes:
- Text Mode. In text mode, the text blocks surrounded by dotted lines will be displayed in the PDF document, then you can copy, paste, add, or delete text.
- Image Mode. In image mode, the images surrounded by dotted lines will be displayed in the PDF document, then you can delete, crop, rotate, mirror, replace, save images, or set transparency.
- Text-Image Mode. In text-image mode, the text blocks and images surrounded by dotted lines will be displayed in the PDF document, then you can edit text and images.
Initialize the Editing Mode
TBefore editing, you should initialize editing mode. ComPDFKit provides methods to initialize editing mode. The following code shows you how to initialize the editing mode:
CPDFViewer viewer = new CPDFViewer(); viewer.InitDocument("***"); viewer.SetMouseMode(MouseModes.PDFEdit); viewer.SetPDFEditType(CPDFEditType.EditText|CPDFEditType.EditImage);