iOS
ComPDFKit PDF SDK
Guides

End Text Editing and Save

 

You can end edit mode at any time. You can exit editing mode using endit. Before using writeToURL to save changes to an edited document, you should submit the changes by commitEditing before exiting editing mode. Otherwise, the changes won't be saved.

 

objective-c
/**
 * Get the font name of the selected text.
 */
- (NSString *)editingSelectionFontName;

/**
 * Set the font name of the selected text.
 */
- (void)setEditingSelectionFontName:(NSString *)fontName;

/**
 * Get whether the selected text is italic.
 */
- (BOOL)isItalicCurrentSelection;

/**
 * Set the selected text is italic.
 */
- (void)setCurrentSelectionIsItalic:(BOOL)isItalic;

/**
 * Get whether the selected text is bold.
 */
- (BOOL)isBoldCurrentSelection;

/**
 * Set the selected text is bold.
 */
- (void)setCurrentSelectionIsBold:(BOOL)isBold;

 

The code of saving document, see Save a Document of Basic Operation part in this guide.