org.pdfbox.pdmodel.interactive.action.type
Class PDActionLaunch
- COSObjectable, PDDestinationOrAction
public class PDActionLaunch
This represents a launch action that can be executed in a PDF document.
static String | SUB_TYPE - This type of action this object represents.
|
String | getD() - This will get the string specifying the default directory in standard DOS syntax.
|
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.
|
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.
|
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(String d) - This will set the string specifying the default directory in standard DOS syntax.
|
void | setF(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(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) - This will specify the destination document to open in a new window.
|
void | setP(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() - This will specify whether to open the destination document in a new window.
|
SUB_TYPE
public static final String SUB_TYPE
This type of action this object represents.
PDActionLaunch
public PDActionLaunch()
Default constructor.
PDActionLaunch
public PDActionLaunch(COSDictionary a)
Constructor.
a
- The action dictionary.
getD
public String getD()
This will get the string specifying the default directory in standard DOS syntax.
- The D entry of the specific Windows launch parameter dictionary.
getF
public 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.
- The F entry of the specific Windows launch parameter dictionary.
getFile
public PDFileSpecification getFile()
throws 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.
- The F entry of the specific launch action dictionary.
getO
public 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.
- The O entry of the specific Windows launch parameter dictionary.
getP
public 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.
- The P entry of the specific Windows launch parameter dictionary.
getWinLaunchParams
public PDWindowsLaunchParams getWinLaunchParams()
This will get a dictionary containing Windows-specific launch parameters.
- The Win entry of of the specific launch action dictionary.
setD
public void setD(String d)
This will set the string specifying the default directory in standard DOS syntax.
d
- The default directory.
setF
public void setF(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.
f
- The file name to be launched.
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.
fs
- The file specification.
setO
public void setO(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.
o
- The operation to perform.
setOpenInNewWindow
public void setOpenInNewWindow(boolean value)
This will specify the destination document to open in a new window.
setP
public void setP(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.
p
- The parameter string.
setWinLaunchParams
public void setWinLaunchParams(PDWindowsLaunchParams win)
This will set a dictionary containing Windows-specific launch parameters.
win
- The action to be performed.
shouldOpenInNewWindow
public boolean shouldOpenInNewWindow()
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.
- A flag specifying whether to open the destination document in a new window.