public interface

DocumentEditingController

implements ThumbnailGridSpecialModeController
com.pspdfkit.ui.special_mode.controller.DocumentEditingController

Class Overview

Default controller for editing PDF pages.

Summary

Public Methods
abstract void duplicateSelectedPages()
Perform duplicate selected pages action on document editor.
abstract void exportSelectedPages(Context context)
Exports selected pages into a separate document.
abstract DocumentEditingManager getDocumentEditingManager()
Returns document editing manager, so the document editing mode listeners can be registered.
abstract Set<Integer> getSelectedPages()
Gets currently selected pages on document editor.
abstract void importDocument(Context context)
Imports all the pages from a given document source to a destination index, if no page is selected the imported document will be appended.
abstract boolean isDocumentEmpty()
Checks if document editor has removed every document page.
abstract boolean isExportEnabled()
Indicates whether the exporting of the pages is enabled.
abstract boolean isRedoEnabled()
Checks if redo operation is possible on document editor.
abstract boolean isSaveAsEnabled()
Indicates whether the 'Save As' is enabled on the selected pages, meaning the new document is created once the editing is finished.
abstract boolean isUndoEnabled()
Checks if undo operation is possible on document editor.
abstract void performSaving(Context context, View popupAnchorView)
Performs saving of the items.
abstract List<EditingChange> redo()
Perform redo changes on document editor.
abstract void removeSelectedPages()
Perform remove selected pages action on document editor.
abstract void rotateSelectedPages()
Perform rotate selected pages action on document editor.
abstract void setSelectedPages(Set<Integer> pages)
Sets currently selected pages on document editor.
abstract List<EditingChange> undo()
Perform undo changes on document editor.
[Expand]
Inherited Methods
From interface com.pspdfkit.ui.special_mode.controller.base.SpecialModeController
From interface com.pspdfkit.ui.special_mode.controller.base.ThumbnailGridSpecialModeController

Public Methods

public abstract void duplicateSelectedPages ()

Perform duplicate selected pages action on document editor.

public abstract void exportSelectedPages (Context context)

Exports selected pages into a separate document.

Parameters
context The context to use.

public abstract DocumentEditingManager getDocumentEditingManager ()

Returns document editing manager, so the document editing mode listeners can be registered.

Returns
  • Document editing manager managing the document editing listeners.

public abstract Set<Integer> getSelectedPages ()

Gets currently selected pages on document editor.

Returns
  • Set containing the selected page positions.

public abstract void importDocument (Context context)

Imports all the pages from a given document source to a destination index, if no page is selected the imported document will be appended.

Parameters
context The context to use for opening the SAF picker.

public abstract boolean isDocumentEmpty ()

Checks if document editor has removed every document page. This is useful to avoid saving documents with zero pages.

Returns
  • true if document editor has no pages.

public abstract boolean isExportEnabled ()

Indicates whether the exporting of the pages is enabled.

Returns
  • true if page exporting is enabled.

public abstract boolean isRedoEnabled ()

Checks if redo operation is possible on document editor.

Returns
  • true if redo operation is allowed.

public abstract boolean isSaveAsEnabled ()

Indicates whether the 'Save As' is enabled on the selected pages, meaning the new document is created once the editing is finished.

Returns
  • true if 'Save As' is enabled.

public abstract boolean isUndoEnabled ()

Checks if undo operation is possible on document editor.

Returns
  • true if undo operation is allowed.

public abstract void performSaving (Context context, View popupAnchorView)

Performs saving of the items.

Parameters
context The context to use.
popupAnchorView The view on which to append the possible pop-up menu with 'Save' and 'Save As' options.

public abstract List<EditingChange> redo ()

Perform redo changes on document editor.

Returns
  • List of editing changes for undo/redo operations.

public abstract void removeSelectedPages ()

Perform remove selected pages action on document editor.

public abstract void rotateSelectedPages ()

Perform rotate selected pages action on document editor.

public abstract void setSelectedPages (Set<Integer> pages)

Sets currently selected pages on document editor.

Parameters
pages Set of pages to select (by position).

public abstract List<EditingChange> undo ()

Perform undo changes on document editor.

Returns
  • List of editing changes for undo/redo operations.