Class PDActionLaunch

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SUB_TYPE
      This type of action this object represents.
      • Fields inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

        action, TYPE
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String getD()
      This will get the string specifying the default directory in standard DOS syntax.
      java.lang.String getF()
      This will get the file name to be launched or the document to be opened or printed, in standard Windows pathname format.
      PDFileSpecification getFile()
      This will get the application to be launched or the document to be opened or printed.
      java.lang.String getO()
      This will get the string specifying the operation to perform: open to open a document print to print a document If the F entry designates an application instead of a document, this entry is ignored and the application is launched.
      OpenMode getOpenInNewWindow()
      This will specify whether to open the destination document in a new window, in the same window, or behave in accordance with the current user preference.
      java.lang.String getP()
      This will get a parameter string to be passed to the application designated by the F entry.
      PDWindowsLaunchParams getWinLaunchParams()
      This will get a dictionary containing Windows-specific launch parameters.
      void setD​(java.lang.String d)
      This will set the string specifying the default directory in standard DOS syntax.
      void setF​(java.lang.String f)
      This will set the file name to be launched or the document to be opened or printed, in standard Windows pathname format.
      void setFile​(PDFileSpecification fs)
      This will set the application to be launched or the document to be opened or printed.
      void setO​(java.lang.String o)
      This will set the string specifying the operation to perform: open to open a document print to print a document If the F entry designates an application instead of a document, this entry is ignored and the application is launched.
      void setOpenInNewWindow​(boolean value)
      void setOpenInNewWindow​(OpenMode value)
      This will specify whether to open the destination document in a new window.
      void setP​(java.lang.String p)
      This will set a parameter string to be passed to the application designated by the F entry.
      void setWinLaunchParams​(PDWindowsLaunchParams win)
      This will set a dictionary containing Windows-specific launch parameters.
      boolean shouldOpenInNewWindow()
      Deprecated.
      • Methods inherited from class java.lang.Object

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

      • SUB_TYPE

        public static final java.lang.String SUB_TYPE
        This type of action this object represents.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDActionLaunch

        public PDActionLaunch()
        Default constructor.
      • PDActionLaunch

        public PDActionLaunch​(COSDictionary a)
        Constructor.
        Parameters:
        a - The action dictionary.
    • Method Detail

      • getFile

        public PDFileSpecification getFile()
                                    throws java.io.IOException
        This will get the application to be launched or the document to be opened or printed. It is required if none of the entries Win, Mac or Unix is present. If this entry is absent and the viewer application does not understand any of the alternative entries it should do nothing.
        Returns:
        The F entry of the specific launch action dictionary.
        Throws:
        java.io.IOException - If there is an error creating the file spec.
      • setFile

        public void setFile​(PDFileSpecification fs)
        This will set the application to be launched or the document to be opened or printed. It is required if none of the entries Win, Mac or Unix is present. If this entry is absent and the viewer application does not understand any of the alternative entries it should do nothing.
        Parameters:
        fs - The file specification.
      • getWinLaunchParams

        public PDWindowsLaunchParams getWinLaunchParams()
        This will get a dictionary containing Windows-specific launch parameters.
        Returns:
        The Win entry of of the specific launch action dictionary.
      • setWinLaunchParams

        public void setWinLaunchParams​(PDWindowsLaunchParams win)
        This will set a dictionary containing Windows-specific launch parameters.
        Parameters:
        win - The action to be performed.
      • getF

        public java.lang.String getF()
        This will get the file name to be launched or the document to be opened or printed, in standard Windows pathname format. If the name string includes a backslash character (\), the backslash must itself be preceded by a backslash. This value must be a single string; it is not a file specification.
        Returns:
        The F entry of the specific Windows launch parameter dictionary.
      • setF

        public void setF​(java.lang.String f)
        This will set the file name to be launched or the document to be opened or printed, in standard Windows pathname format. If the name string includes a backslash character (\), the backslash must itself be preceded by a backslash. This value must be a single string; it is not a file specification.
        Parameters:
        f - The file name to be launched.
      • getD

        public java.lang.String getD()
        This will get the string specifying the default directory in standard DOS syntax.
        Returns:
        The D entry of the specific Windows launch parameter dictionary.
      • setD

        public void setD​(java.lang.String d)
        This will set the string specifying the default directory in standard DOS syntax.
        Parameters:
        d - The default directory.
      • getO

        public java.lang.String getO()
        This will get the string specifying the operation to perform: open to open a document print to print a document If the F entry designates an application instead of a document, this entry is ignored and the application is launched. Default value: open.
        Returns:
        The O entry of the specific Windows launch parameter dictionary.
      • setO

        public void setO​(java.lang.String o)
        This will set the string specifying the operation to perform: open to open a document print to print a document If the F entry designates an application instead of a document, this entry is ignored and the application is launched. Default value: open.
        Parameters:
        o - The operation to perform.
      • getP

        public java.lang.String getP()
        This will get a parameter string to be passed to the application designated by the F entry. This entry should be omitted if F designates a document.
        Returns:
        The P entry of the specific Windows launch parameter dictionary.
      • setP

        public void setP​(java.lang.String p)
        This will set a parameter string to be passed to the application designated by the F entry. This entry should be omitted if F designates a document.
        Parameters:
        p - The parameter string.
      • shouldOpenInNewWindow

        @Deprecated
        public boolean shouldOpenInNewWindow()
        Deprecated.
        This will specify whether to open the destination document in a new window. If this flag is false, the destination document will replace the current document in the same window. If this entry is absent, the viewer application should behave in accordance with the current user preference. This entry is ignored if the file designated by the F entry is not a PDF document.
        Returns:
        A flag specifying whether to open the destination document in a new window.
      • setOpenInNewWindow

        @Deprecated
        public void setOpenInNewWindow​(boolean value)
        This will specify the destination document to open in a new window.
        Parameters:
        value - The flag value.
      • getOpenInNewWindow

        public OpenMode getOpenInNewWindow()
        This will specify whether to open the destination document in a new window, in the same window, or behave in accordance with the current user preference.
        Returns:
        A flag specifying how to open the destination document.
      • setOpenInNewWindow

        public void setOpenInNewWindow​(OpenMode value)
        This will specify whether to open the destination document in a new window.
        Parameters:
        value - The flag value.