Enum Class ViewerCommands

java.lang.Object
java.lang.Enum<ViewerCommands>
org.jpedal.examples.viewer.ViewerCommands
All Implemented Interfaces:
Serializable, Comparable<ViewerCommands>, Constable

public enum ViewerCommands extends Enum<ViewerCommands>
An enum containing all the possible commands you can use with viewer.executeCommand()
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Show the About dialog with the version details.
    Show a dialog to choose pages and an image, then let the user drag the area to place it in, then save the document (asking whether to overwrite the open file) and reopen it.
    Show a dialog to insert blank pages of a chosen size, then save the document (asking whether to overwrite the open file) and reopen it.
    Add a view to the history used by FORWARD and BACK.
    Toggle auto scrolling, which scrolls the view when the mouse is dragged past its edge.
    Go back to the previous view in the history added by ADDVIEW.
    Go back 1 page.
    Show a dialog to export a range of pages as images.
    Go to the page of a bookmark.
    Open the JPedal pricing page in the default browser.
    Set whether shapes and line art are recoloured along with the text when a text colour is set, then repaint.
    Identifies the Content menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Show the pages in a continuous vertical column and set the mouse to pan.
    Show the pages in a continuous column of facing pairs, fit to the page, and set the mouse to pan.
    Copy the highlighted text to the clipboard.
    Show a dialog to copy a page to another position, then save the document (asking whether to overwrite the open file) and reopen it.
    Show a dialog to crop pages, then save the document (asking whether to overwrite the open file) and reopen it.
    Identifies the whole Swing menu bar, for showing, hiding, enabling or disabling it.
    Clear all highlighted text and images.
    Show the document properties dialog.
    Downsample all images using the default settings, then save the document (asking whether to overwrite the open file) and reopen it.
    Identifies the Edit menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Show a dialog to embed a file in the document as an attachment, then save the document (asking whether to overwrite the open file) and reopen it.
    Close the document and the Viewer, saving the Viewer settings and warning about unsaved forms first.
    Identifies the Export menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Show a preview of the selected area as an image, which can be copied or saved.
    Show a dialog to extract the highlighted text.
    Show the pages as facing pairs, fit to the page, and set the mouse to pan.
    Go back 10 pages, stopping at the first page.
    Go forward 10 pages, stopping at the last page.
    Identifies the File menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Search the document.
    Go to the first page.
    Flatten all layers, removing hidden layers and making visible layers permanent, then save the document (asking whether to overwrite the open file) and reopen it.
    Go forward to the next view in the history added by ADDVIEW.
    Go forward 1 page.
    Toggle full screen mode, if supported.
    Go to a page.
    Identifies the Go To menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Open the JPedal documentation in the default browser.
    Not used by the Viewer.
    Remove the version number from the window title.
    Clear the current text highlights, then highlight areas on a page.
    Show a dialog to extract the images embedded in a range of pages.
    Show a dialog to choose pages to keep, removing all the others, then save the document (asking whether to overwrite the open file) and reopen it.
    Go to the last page.
    Toggle the mouse between selecting text and panning the page.
    Show a dialog to move a page to another position, then save the document (asking whether to overwrite the open file) and reopen it.
    Open the next document in the recent documents list.
    Show the next search result, wrapping round to the first result.
    Show a dialog to combine several pages onto each page in a grid of rows and columns, then save the document (asking whether to overwrite the open file) and reopen it.
    No longer handled: does nothing.
    Open a file.
    Open the current file in the operating system's default application.
    Identifies the Open menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Open a PDF from a URL.
    Optimise image colour palettes to fit an indexed colour space, losslessly reducing image size, then save the document (asking whether to overwrite the open file) and reopen it.
    Show the pages in the page flow view, which needs JavaFX.
    Return the text grouping object for a page, decoding the page in the background if it is not the page being displayed.
    Identifies the Page Layout menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Set the mouse to pan the page.
    Not used by the Viewer.
    Show a PDF portfolio's files as a detailed list.
    Show a PDF portfolio's files as tiles.
    Identifies the Portfolio menu, which is only shown for PDF portfolios, in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Show the preferences dialog.
    Open the previous document in the recent documents list.
    Show the previous search result, wrapping round to the last result.
    Show the print dialog for the open document.
    Show a dialog to choose pages, then let the user drag the area of text to redact, then save the document (asking whether to overwrite the open file) and reopen it.
    Show a dialog to choose pages to remove annotations from, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove blank pages, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove all bookmarks, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove all digital signatures, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove all embedded files, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove the initial view settings, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove all JavaScript, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove all links, then save the document (asking whether to overwrite the open file) and reopen it.
    Remove the document metadata, then save the document (asking whether to overwrite the open file) and reopen it.
    Show a dialog to remove pages, then save the document (asking whether to overwrite the open file) and reopen it.
    Set the colour all text is drawn in, without repainting.
    Reverse the page order, then save the document (asking whether to overwrite the open file) and reopen it.
    Rotate the display 90 degrees anticlockwise.
    Show a dialog to rotate pages, then save the document (asking whether to overwrite the open file) and reopen it.
    Rotate the display 90 degrees clockwise.
    Rotate the display.
    Show a dialog to save the open file.
    Show a dialog to save the document after annotations have been added.
    Show a dialog to scale pages, then save the document (asking whether to overwrite the open file) and reopen it.
    Set the scaling.
    Scroll an area of a page into view.
    Highlight all the text on the current page.
    Toggle whether the first page is shown on its own in facing views, and save the setting.
    Set the background colour of the display area around the pages.
    Show a dialog to edit the document information, which is written to both the Info dictionary and the XMP metadata, then save the document (asking whether to overwrite the open file) and reopen it.
    Set whether lines thinner than 1 pixel are widened so they stay visible, then repaint.
    Set whether all shapes are drawn with a 1 pixel stroke after scaling, then repaint.
    Set whether interactive form fields are highlighted, then repaint.
    Show a dialog to set the page, page layout and page mode the document opens with, then save the document (asking whether to overwrite the open file) and reopen it.
    Set the page background colour and repaint.
    Set the threshold that decides which text is recoloured when a text colour is set.
    Set the colour all text is drawn in and repaint.
    Set the colour shown for pages that have not been drawn yet.
    Show the version number in the window title.
    Show the dialog to digitally sign the open file.
    Show one page at a time and set the mouse to select text.
    Let the user drag an area of the page to extract as an image.
    Show a dialog to extract the text from a range of pages.
    Set the mouse to select text.
    Show the Tip of the Day dialog.
    Identifies the Tools menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Show or hide part of the Viewer's GUI.
    Identifies the View menu in the Swing menu bar, for showing, hiding, enabling or disabling it.
    Open the IDRsolutions website in the default browser.
    Not used by the Viewer.
    No longer handled: does nothing.
    No longer handled: does nothing.
    Zoom in to the next preset scaling, up to 1000%.
    Zoom out to the next preset scaling, down to 25%.
  • Method Summary

    Modifier and Type
    Method
    Description
    createFromID(int id)
    Returns the command with the given ID, which is the value of the matching constant in Commands.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • ABOUT

      public static final ViewerCommands ABOUT
      Show the About dialog with the version details. Does nothing if arguments are passed.
    • BITMAP

      public static final ViewerCommands BITMAP
      Show a dialog to export a range of pages as images. Does nothing if arguments are passed.
    • IMAGES

      public static final ViewerCommands IMAGES
      Show a dialog to extract the images embedded in a range of pages. Does nothing if arguments are passed.
    • TEXT

      public static final ViewerCommands TEXT
      Show a dialog to extract the text from a range of pages. Does nothing if arguments are passed.
    • SAVE

      public static final ViewerCommands SAVE
      Show a dialog to save the open file. Does nothing if arguments are passed.
    • PRINT

      public static final ViewerCommands PRINT
      Show the print dialog for the open document. Does nothing if arguments are passed.
    • EXIT

      public static final ViewerCommands EXIT
      Close the document and the Viewer, saving the Viewer settings and warning about unsaved forms first. The JVM exits if Viewer.exitOnClose is true. Does nothing if arguments are passed.
    • AUTOSCROLL

      public static final ViewerCommands AUTOSCROLL
      Toggle auto scrolling, which scrolls the view when the mouse is dragged past its edge. Does nothing if arguments are passed.
    • DOCINFO

      public static final ViewerCommands DOCINFO
      Show the document properties dialog. Does nothing if arguments are passed.
    • OPENFILE

      public static final ViewerCommands OPENFILE
      Open a file. With no arguments a file chooser is shown. Otherwise, args are a File or String path, optionally followed by a String named destination to go to; an InputStream, optionally followed by a String file name; or a byte[] followed by a String file name. The file name's extension decides whether it is opened as a PDF or an image.
    • BOOKMARK

      public static final ViewerCommands BOOKMARK
      Go to the page of a bookmark. The arg is the String bookmark title and must be passed.
    • FIND

      public static final ViewerCommands FIND
      Search the document. With no arguments the search window is shown, filled in with any highlighted text. Otherwise, args are the String search term, optionally followed by all three of an Integer of SearchType flags, a Boolean for whether the term holds several words to search for separately, and a Boolean for whether to search only the current page. If all 3 optional values aren't present only the first is used.
    • SNAPSHOT

      public static final ViewerCommands SNAPSHOT
      Let the user drag an area of the page to extract as an image. Only works in single page view. Returns a Boolean that is true while waiting for the user to drag the area.
    • OPENURL

      public static final ViewerCommands OPENURL
      Open a PDF from a URL. With no arguments a dialog asks for the URL. Otherwise, the arg is the String URL.
    • VISITWEBSITE

      public static final ViewerCommands VISITWEBSITE
      Open the IDRsolutions website in the default browser. Does nothing if arguments are passed.
    • PREVIOUSDOCUMENT

      public static final ViewerCommands PREVIOUSDOCUMENT
      Open the previous document in the recent documents list. Does nothing if arguments are passed.
    • NEXTDOCUMENT

      public static final ViewerCommands NEXTDOCUMENT
      Open the next document in the recent documents list. Does nothing if arguments are passed.
    • PREVIOUSRESULT

      public static final ViewerCommands PREVIOUSRESULT
      Show the previous search result, wrapping round to the last result. Returns Commands.SEARCH_RETURNED_TO_START, Commands.SEARCH_NOT_FOUND, Commands.FIRST_DOCUMENT_SEARCH_RESULT_NOW_SHOWN or null. Does nothing if arguments are passed.
    • NEXTRESULT

      public static final ViewerCommands NEXTRESULT
      Show the next search result, wrapping round to the first result. Returns Commands.SEARCH_RETURNED_TO_START, Commands.SEARCH_NOT_FOUND, Commands.FIRST_DOCUMENT_SEARCH_RESULT_NOW_SHOWN or null. Does nothing if arguments are passed.
    • TIP

      public static final ViewerCommands TIP
      Show the Tip of the Day dialog. Does nothing if arguments are passed.
    • PREFERENCES

      public static final ViewerCommands PREFERENCES
      Show the preferences dialog. Does nothing if arguments are passed.
    • COPY

      public static final ViewerCommands COPY
      Copy the highlighted text to the clipboard. Arguments are ignored.
    • SELECTALL

      public static final ViewerCommands SELECTALL
      Highlight all the text on the current page. Only works in single page view. Arguments are ignored.
    • DESELECTALL

      public static final ViewerCommands DESELECTALL
      Clear all highlighted text and images. Only works in single page view. Arguments are ignored.
    • UPDATEGUILAYOUT

      public static final ViewerCommands UPDATEGUILAYOUT
      Show or hide part of the Viewer's GUI. Args are the String property name of the component and a Boolean for whether to show it. Does nothing unless exactly 2 arguments are passed.
    • MOUSEMODE

      public static final ViewerCommands MOUSEMODE
      Toggle the mouse between selecting text and panning the page. Not available in facing or page flow view. Does nothing if arguments are passed.
    • PANMODE

      public static final ViewerCommands PANMODE
      Set the mouse to pan the page. Does nothing if arguments are passed.
    • TEXTSELECT

      public static final ViewerCommands TEXTSELECT
      Set the mouse to select text. Does nothing if arguments are passed.
    • SEPARATECOVER

      public static final ViewerCommands SEPARATECOVER
      Toggle whether the first page is shown on its own in facing views, and save the setting. Does nothing if arguments are passed.
    • EXTRACTTEXT

      public static final ViewerCommands EXTRACTTEXT
      Show a dialog to extract the highlighted text. Does nothing if arguments are passed.
    • EXTRACTASIMAGE

      public static final ViewerCommands EXTRACTASIMAGE
      Show a preview of the selected area as an image, which can be copied or saved. Arguments are ignored.
    • ROTATELEFT

      public static final ViewerCommands ROTATELEFT
      Rotate the display 90 degrees anticlockwise. Arguments are ignored.
    • ROTATERIGHT

      public static final ViewerCommands ROTATERIGHT
      Rotate the display 90 degrees clockwise. Arguments are ignored.
    • OPENINSYSTEMDEFAULT

      public static final ViewerCommands OPENINSYSTEMDEFAULT
      Open the current file in the operating system's default application. Optionally the arg is a String path of a different file to open.
    • XREF

      public static final ViewerCommands XREF
      No longer handled: does nothing. There is no matching constant in Commands.
    • OBJECTS

      public static final ViewerCommands OBJECTS
      No longer handled: does nothing. There is no matching constant in Commands.
    • SIGN

      public static final ViewerCommands SIGN
      Show the dialog to digitally sign the open file. Does nothing if arguments are passed.
    • XREFSTREAM

      public static final ViewerCommands XREFSTREAM
      No longer handled: does nothing. There is no matching constant in Commands.
    • FIRSTPAGE

      public static final ViewerCommands FIRSTPAGE
      Go to the first page. Does nothing if arguments are passed.
    • FBACKPAGE

      public static final ViewerCommands FBACKPAGE
      Go back 10 pages, stopping at the first page. Does nothing if arguments are passed.
    • BACKPAGE

      public static final ViewerCommands BACKPAGE
      Go back 1 page. Optionally the arg is the number of pages to go back, as a String.
    • FORWARDPAGE

      public static final ViewerCommands FORWARDPAGE
      Go forward 1 page. Optionally the arg is the number of pages to go forward, as a String.
    • FFORWARDPAGE

      public static final ViewerCommands FFORWARDPAGE
      Go forward 10 pages, stopping at the last page. Does nothing if arguments are passed.
    • LASTPAGE

      public static final ViewerCommands LASTPAGE
      Go to the last page. Does nothing if arguments are passed.
    • GOTO

      public static final ViewerCommands GOTO
      Go to a page. With no arguments a dialog asks for the page number. Otherwise the arg is the page number as a String.
    • SINGLE

      public static final ViewerCommands SINGLE
      Show one page at a time and set the mouse to select text. Does nothing if arguments are passed.
    • CONTINUOUS

      public static final ViewerCommands CONTINUOUS
      Show the pages in a continuous vertical column and set the mouse to pan. Does nothing if arguments are passed.
    • CONTINUOUS_FACING

      public static final ViewerCommands CONTINUOUS_FACING
      Show the pages in a continuous column of facing pairs, fit to the page, and set the mouse to pan. Does nothing if arguments are passed.
    • FACING

      public static final ViewerCommands FACING
      Show the pages as facing pairs, fit to the page, and set the mouse to pan. Does nothing if arguments are passed.
    • PAGEFLOW

      public static final ViewerCommands PAGEFLOW
      Show the pages in the page flow view, which needs JavaFX. Does nothing if arguments are passed.
    • FULLSCREEN

      public static final ViewerCommands FULLSCREEN
      Toggle full screen mode, if supported. Does nothing if arguments are passed.
    • ZOOMIN

      public static final ViewerCommands ZOOMIN
      Zoom in to the next preset scaling, up to 1000%. Does nothing if arguments are passed.
    • ZOOMOUT

      public static final ViewerCommands ZOOMOUT
      Zoom out to the next preset scaling, down to 25%. Does nothing if arguments are passed.
    • PORTFOLIO_DETAIL

      public static final ViewerCommands PORTFOLIO_DETAIL
      Show a PDF portfolio's files as a detailed list. Arguments are ignored.
    • PORTFOLIO_TILES

      public static final ViewerCommands PORTFOLIO_TILES
      Show a PDF portfolio's files as tiles. Arguments are ignored.
    • ROTATION

      public static final ViewerCommands ROTATION
      Rotate the display. With no arguments the rotation selected in the toolbar is applied. Otherwise, the arg is the rotation in degrees as a String: 0, 90, 180 or 270.
    • SCALING

      public static final ViewerCommands SCALING
      Set the scaling. With no arguments the scaling selected in the toolbar is applied. Otherwise, the arg is the scaling as a percentage number or one of the toolbar's text options, such as "Fit Width".
    • CURRENTMENU

      public static final ViewerCommands CURRENTMENU
      Identifies the whole Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • CONTENTMENU

      public static final ViewerCommands CONTENTMENU
      Identifies the Content menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • PDFMENU

      public static final ViewerCommands PDFMENU
      Not used by the Viewer. Running it as a command does nothing.
    • EXPORTMENU

      public static final ViewerCommands EXPORTMENU
      Identifies the Export menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • WINDOWMENU

      public static final ViewerCommands WINDOWMENU
      Not used by the Viewer. Running it as a command does nothing.
    • PAGELAYOUTMENU

      public static final ViewerCommands PAGELAYOUTMENU
      Identifies the Page Layout menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • EDITMENU

      public static final ViewerCommands EDITMENU
      Identifies the Edit menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • GOTOMENU

      public static final ViewerCommands GOTOMENU
      Identifies the Go To menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • VIEWMENU

      public static final ViewerCommands VIEWMENU
      Identifies the View menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • OPENMENU

      public static final ViewerCommands OPENMENU
      Identifies the Open menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • FILEMENU

      public static final ViewerCommands FILEMENU
      Identifies the File menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • HELPFORUM

      public static final ViewerCommands HELPFORUM
      Not used by the Viewer. The Help menu is identified by HELP. Running it as a command does nothing.
    • PORTFOLIOMENU

      public static final ViewerCommands PORTFOLIOMENU
      Identifies the Portfolio menu, which is only shown for PDF portfolios, in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • TOOLSMENU

      public static final ViewerCommands TOOLSMENU
      Identifies the Tools menu in the Swing menu bar, for showing, hiding, enabling or disabling it. Running it as a command does nothing.
    • SAVEFORM

      public static final ViewerCommands SAVEFORM
      Show a dialog to save the document after annotations have been added. If no annotation has been added, no file is written. Does nothing if arguments are passed.
    • HIGHLIGHT

      public static final ViewerCommands HIGHLIGHT
      Clear the current text highlights, then highlight areas on a page. Args are an int[][] of {x, y, width, height} rectangles in PDF coordinates, the Integer page, and an optional Boolean, default true, where true highlights the rectangles and false highlights whole lines from the top left to the bottom right. With no arguments the highlights are only cleared.
    • SCROLL

      public static final ViewerCommands SCROLL
      Scroll an area of a page into view. Args are an int[] {x, y, width, height} rectangle and an optional Integer page, default the current page. Does nothing with no arguments.
    • ADDVIEW

      public static final ViewerCommands ADDVIEW
      Add a view to the history used by FORWARD and BACK. Args are the Integer page, the Rectangle location and the Integer scaling type.
    • FORWARD

      public static final ViewerCommands FORWARD
      Go forward to the next view in the history added by ADDVIEW. Arguments are ignored.
    • BACK

      public static final ViewerCommands BACK
      Go back to the previous view in the history added by ADDVIEW. Arguments are ignored.
    • PAGEGROUPING

      public static final ViewerCommands PAGEGROUPING
      Return the text grouping object for a page, decoding the page in the background if it is not the page being displayed. The arg is the Integer page. Returns null with no arguments or if an error occurs.
    • SETPAGECOLOR

      public static final ViewerCommands SETPAGECOLOR
      Set the page background colour and repaint. The arg is the colour as an Integer RGB value.
    • SETUNDRAWNPAGECOLOR

      public static final ViewerCommands SETUNDRAWNPAGECOLOR
      Set the colour shown for pages that have not been drawn yet. The arg is the colour as an Integer RGB value.
    • REPLACETEXTCOLOR

      public static final ViewerCommands REPLACETEXTCOLOR
      Set the colour all text is drawn in, without repainting. The arg is the colour as an Integer RGB value. SETTEXTCOLOR does the same and repaints.
    • SETTEXTCOLOR

      public static final ViewerCommands SETTEXTCOLOR
      Set the colour all text is drawn in and repaint. The arg is the colour as an Integer RGB value.
    • CHANGELINEART

      public static final ViewerCommands CHANGELINEART
      Set whether shapes and line art are recoloured along with the text when a text colour is set, then repaint. The arg is a Boolean.
    • SETDISPLAYBACKGROUND

      public static final ViewerCommands SETDISPLAYBACKGROUND
      Set the background colour of the display area around the pages. The arg is the colour as an Integer RGB value.
    • SETREPLACEMENTCOLORTHRESHOLD

      public static final ViewerCommands SETREPLACEMENTCOLORTHRESHOLD
      Set the threshold that decides which text is recoloured when a text colour is set. The arg is the threshold as an Integer.
    • SETENHANCEFRACTIONALLINES

      public static final ViewerCommands SETENHANCEFRACTIONALLINES
      Set whether lines thinner than 1 pixel are widened so they stay visible, then repaint. The arg is a Boolean.
    • SETHIDELINEWEIGHTS

      public static final ViewerCommands SETHIDELINEWEIGHTS
      Set whether all shapes are drawn with a 1 pixel stroke after scaling, then repaint. The arg is a Boolean.
    • SETHIGHLIGHTFORMFIELDS

      public static final ViewerCommands SETHIGHLIGHTFORMFIELDS
      Set whether interactive form fields are highlighted, then repaint. The arg is a Boolean.
    • HELP

      public static final ViewerCommands HELP
      Open the JPedal documentation in the default browser. Does nothing if arguments are passed.
    • BUY

      public static final ViewerCommands BUY
      Open the JPedal pricing page in the default browser. Does nothing if arguments are passed.
    • HIDEVERSIONNUMBER

      public static final ViewerCommands HIDEVERSIONNUMBER
      Remove the version number from the window title. Arguments are ignored.
    • SHOWVERSIONNUMBER

      public static final ViewerCommands SHOWVERSIONNUMBER
      Show the version number in the window title. Arguments are ignored.
    • ADDPAGE

      public static final ViewerCommands ADDPAGE
      Show a dialog to insert blank pages of a chosen size, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • ADDIMAGE

      public static final ViewerCommands ADDIMAGE
      Show a dialog to choose pages and an image, then let the user drag the area to place it in, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • COPYPAGE

      public static final ViewerCommands COPYPAGE
      Show a dialog to copy a page to another position, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • CROPPAGE

      public static final ViewerCommands CROPPAGE
      Show a dialog to crop pages, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • EMBEDFILE

      public static final ViewerCommands EMBEDFILE
      Show a dialog to embed a file in the document as an attachment, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • ISOLATEPAGE

      public static final ViewerCommands ISOLATEPAGE
      Show a dialog to choose pages to keep, removing all the others, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • NUP

      public static final ViewerCommands NUP
      Show a dialog to combine several pages onto each page in a grid of rows and columns, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEPAGE

      public static final ViewerCommands REMOVEPAGE
      Show a dialog to remove pages, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • ROTATEPAGE

      public static final ViewerCommands ROTATEPAGE
      Show a dialog to rotate pages, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • SCALEPAGE

      public static final ViewerCommands SCALEPAGE
      Show a dialog to scale pages, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • SETDOCUMENTINFO

      public static final ViewerCommands SETDOCUMENTINFO
      Show a dialog to edit the document information, which is written to both the Info dictionary and the XMP metadata, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • SETINITIALVIEW

      public static final ViewerCommands SETINITIALVIEW
      Show a dialog to set the page, page layout and page mode the document opens with, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEBOOKMARKS

      public static final ViewerCommands REMOVEBOOKMARKS
      Remove all bookmarks, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEEMBEDDEDFILES

      public static final ViewerCommands REMOVEEMBEDDEDFILES
      Remove all embedded files, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEINITIALVIEW

      public static final ViewerCommands REMOVEINITIALVIEW
      Remove the initial view settings, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEJAVASCRIPT

      public static final ViewerCommands REMOVEJAVASCRIPT
      Remove all JavaScript, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEMETADATA

      public static final ViewerCommands REMOVEMETADATA
      Remove the document metadata, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • MOVEPAGE

      public static final ViewerCommands MOVEPAGE
      Show a dialog to move a page to another position, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEANNOTATIONS

      public static final ViewerCommands REMOVEANNOTATIONS
      Show a dialog to choose pages to remove annotations from, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REVERSEPAGES

      public static final ViewerCommands REVERSEPAGES
      Reverse the page order, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REDACT

      public static final ViewerCommands REDACT
      Show a dialog to choose pages, then let the user drag the area of text to redact, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • DOWNSAMPLEIMAGES

      public static final ViewerCommands DOWNSAMPLEIMAGES
      Downsample all images using the default settings, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • FLATTENLAYERS

      public static final ViewerCommands FLATTENLAYERS
      Flatten all layers, removing hidden layers and making visible layers permanent, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • OPTIMIZECOLORPALETTE

      public static final ViewerCommands OPTIMIZECOLORPALETTE
      Optimise image colour palettes to fit an indexed colour space, losslessly reducing image size, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEBLANKPAGES

      public static final ViewerCommands REMOVEBLANKPAGES
      Remove blank pages, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
    • REMOVEDIGITALSIGNATURES

      public static final ViewerCommands REMOVEDIGITALSIGNATURES
      Remove all digital signatures, then save the document (asking whether to overwrite the open file) and reopen it. Does nothing if arguments are passed.
  • Method Details

    • values

      public static ViewerCommands[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ViewerCommands valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createFromID

      public static ViewerCommands createFromID(int id)
      Returns the command with the given ID, which is the value of the matching constant in Commands.
      Parameters:
      id - the command ID
      Returns:
      the matching command, or null if no command has that ID