Class LaunchAction

java.lang.Object
org.openpdf.renderer.action.PDFAction
org.openpdf.renderer.action.LaunchAction

public class LaunchAction extends PDFAction
Action for launching an application, mostly used to open a file.
Since:
08.07.2009
  • Field Details

  • Constructor Details

    • LaunchAction

      public LaunchAction(PDFObject obj, PDFObject root) throws IOException
      Creates a new instance of LaunchAction from an object
      Parameters:
      obj - - the PDFObject with the action information
      root - - the root object
      Throws:
      IOException
  • Method Details

    • isAbsolute

      public static boolean isAbsolute(String fileName)
      Is the file name absolute (if not, it is relative to the path of the currently opened PDF file). If the file name starts with a "/", it is considered to be absolute.
      Returns:
      boolean
    • parseFileSpecification

      private LaunchAction.FileSpec parseFileSpecification(PDFObject fileObj) throws PDFParseException, IOException
      Parse the file specification object
      Parameters:
      fileObj -
      Returns:
      FileSpec - might be null in case the passed object is null
      Throws:
      IOException
      PDFParseException
    • parseWinDict

      private LaunchAction.WinLaunchParam parseWinDict(PDFObject winDict) throws IOException
      Parse the windows specific launch parameters
      Parameters:
      winDict -
      Throws:
      IOException - - in case of a problem during parsing content
    • getFileSpecification

      public LaunchAction.FileSpec getFileSpecification()
      The file / application to be opened
      Returns:
      FileSpec
    • isNewWindow

      public boolean isNewWindow()
      Should a new window be opened for the file/application?
      Returns:
      boolean
    • getUnixParam

      public PDFObject getUnixParam()
      Get the unix specific launch parameters. Note: The dictionary is not specified yet in the PDF spec., so the PdfObject which is returned here is not parsed.
      Returns:
      PDFObject
    • getMacParam

      public PDFObject getMacParam()
      Get the mac specific launch parameters. Note: The dictionary is not specified yet in the PDF spec., so the PdfObject which is returned here is not parsed.
      Returns:
      PDFObject
    • getWinParam

      public LaunchAction.WinLaunchParam getWinParam()
      Get the windows specific launch parameters.
      Returns:
      WinLaunchParam