Interface DocumentEditingController

  • All Implemented Interfaces:
    com.pspdfkit.ui.special_mode.controller.base.SpecialModeController , com.pspdfkit.ui.special_mode.controller.base.ThumbnailGridSpecialModeController

    
    public interface DocumentEditingController
     implements ThumbnailGridSpecialModeController
                        

    Default controller for editing PDF pages.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      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 setSelectedPages(@NonNull() Set<Integer> pages) Sets currently selected pages on document editor.
      abstract boolean isUndoEnabled() Checks if undo operation is possible on document editor.
      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 isExportEnabled() Indicates whether the exporting of the pages is enabled.
      abstract boolean isDocumentEmpty() Checks if document editor has removed every document page.
      abstract List<EditingChange> undo() Perform undo changes on document editor.
      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 duplicateSelectedPages() Perform duplicate selected pages action on document editor.
      abstract void exportSelectedPages(@NonNull() Context context) Exports selected pages into a separate document.
      abstract void performSaving(@NonNull() Context context, @NonNull() View popupAnchorView) Performs saving of the items.
      abstract void importDocument(@NonNull() 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getSelectedPages

        @NonNull() abstract Set<Integer> getSelectedPages()

        Gets currently selected pages on document editor.

        Returns:

        Set containing the selected page positions.

      • setSelectedPages

         abstract void setSelectedPages(@NonNull() Set<Integer> pages)

        Sets currently selected pages on document editor.

        Parameters:
        pages - Set of pages to select (by position).
      • isUndoEnabled

         abstract boolean isUndoEnabled()

        Checks if undo operation is possible on document editor.

        Returns:

        true if undo operation is allowed.

      • isRedoEnabled

         abstract boolean isRedoEnabled()

        Checks if redo operation is possible on document editor.

        Returns:

        true if redo operation is allowed.

      • isSaveAsEnabled

         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.

      • isExportEnabled

         abstract boolean isExportEnabled()

        Indicates whether the exporting of the pages is enabled.

        Returns:

        true if page exporting is enabled.

      • isDocumentEmpty

         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.

      • undo

         abstract List<EditingChange> undo()

        Perform undo changes on document editor.

        Returns:

        List of editing changes for undo/redo operations.

      • redo

         abstract List<EditingChange> redo()

        Perform redo changes on document editor.

        Returns:

        List of editing changes for undo/redo operations.

      • removeSelectedPages

         abstract void removeSelectedPages()

        Perform remove selected pages action on document editor.

      • rotateSelectedPages

         abstract void rotateSelectedPages()

        Perform rotate selected pages action on document editor.

      • duplicateSelectedPages

         abstract void duplicateSelectedPages()

        Perform duplicate selected pages action on document editor.

      • exportSelectedPages

         abstract void exportSelectedPages(@NonNull() Context context)

        Exports selected pages into a separate document.

        Parameters:
        context - The context to use.
      • performSaving

         abstract void performSaving(@NonNull() Context context, @NonNull() 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.
      • importDocument

         abstract void importDocument(@NonNull() 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.