Skip to content
Guides

End Content Editing and Save

After completing edits, you can exit editing mode by using SetMouseMode with CPDFViewer to switch out of edit mode. To save the changes, utilize either WriteToLoadedPath or WriteToFilePath save the modified document.

C#
// Exit edit mode and switch to PanTool mode.
viewer.SetMouseMode(MouseModes.PanTool);

if(viewer.UndoManager.CanSave)
{
  // Save changes to the local document.
  viewer.Document.WriteToLoadedPath();
}