Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.action

public Class PDActionLaunch

extends PDAction
Class Inheritance
Imports
java.io.IOException, org.apache.pdfbox.cos.COSBoolean, .COSDictionary, .COSName, org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification

This represents a launch action that can be executed in a PDF document.
Authors
Ben Litchfield, Panagiotis Toumasis

Field Summary

Modifier and TypeField and Description
public static final String
SUB_TYPE

This type of action this object represents.

Inherited from org.apache.pdfbox.pdmodel.interactive.action.PDAction:
actionTYPE

Constructor Summary

AccessConstructor and Description
public
PDActionLaunch()

Default constructor.

public
PDActionLaunch(COSDictionary
The action dictionary.
a
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The D entry of the specific Windows launch parameter dictionary.
getD
()

This will get the string specifying the default directory in standard DOS syntax.

public String

Returns:

The F entry of the specific Windows launch parameter dictionary.
getF
()

This will get the file name to be launched or the document to be opened or printed, in standard Windows pathname format.

public PDFileSpecification

Returns:

The F entry of the specific launch action dictionary.
getFile
()

This will get the application to be launched or the document to be opened or printed.

public String

Returns:

The O entry of the specific Windows launch parameter dictionary.
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.

public OpenMode

Returns:

A flag specifying how to open the destination document.
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.

public String

Returns:

The P entry of the specific Windows launch parameter dictionary.
getP
()

This will get a parameter string to be passed to the application designated by the F entry.

public PDWindowsLaunchParams

Returns:

The Win entry of of the specific launch action dictionary.
getWinLaunchParams
()

This will get a dictionary containing Windows-specific launch parameters.

public void
setD(String
The default directory.
d
)

This will set the string specifying the default directory in standard DOS syntax.

public void
setF(String
The file name to be launched.
f
)

This will set the file name to be launched or the document to be opened or printed, in standard Windows pathname format.

public void
setFile(PDFileSpecification
The file specification.
fs
)

This will set the application to be launched or the document to be opened or printed.

public void
setO(String
The operation to perform.
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.

public void
setOpenInNewWindow(OpenMode
The flag value.
value
)

This will specify whether to open the destination document in a new window.

public void
setP(String
The parameter string.
p
)

This will set a parameter string to be passed to the application designated by the F entry.

public void
setWinLaunchParams(PDWindowsLaunchParams
The action to be performed.
win
)

This will set a dictionary containing Windows-specific launch parameters.

Inherited from org.apache.pdfbox.pdmodel.interactive.action.PDAction:
getCOSObjectgetNextgetSubTypegetTypesetNextsetSubTypesetType

Field Detail

SUB_TYPEback to summary
public static final String SUB_TYPE

This type of action this object represents.

Constructor Detail

PDActionLaunchback to summary
public PDActionLaunch()

Default constructor.

PDActionLaunchback to summary
public PDActionLaunch(COSDictionary a)

Constructor.

Parameters
a:COSDictionary

The action dictionary.

Method Detail

getDback to summary
public String getD()

This will get the string specifying the default directory in standard DOS syntax.

Returns:String

The D entry of the specific Windows launch parameter dictionary.

getFback to summary
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.

Returns:String

The F entry of the specific Windows launch parameter dictionary.

getFileback to summary
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.

Returns:PDFileSpecification

The F entry of the specific launch action dictionary.

Exceptions
IOException:
If there is an error creating the file spec.
getOback to summary
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.

Returns:String

The O entry of the specific Windows launch parameter dictionary.

getOpenInNewWindowback to summary
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:OpenMode

A flag specifying how to open the destination document.

getPback to summary
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.

Returns:String

The P entry of the specific Windows launch parameter dictionary.

getWinLaunchParamsback to summary
public PDWindowsLaunchParams getWinLaunchParams()

This will get a dictionary containing Windows-specific launch parameters.

Returns:PDWindowsLaunchParams

The Win entry of of the specific launch action dictionary.

setDback to summary
public void setD(String d)

This will set the string specifying the default directory in standard DOS syntax.

Parameters
d:String

The default directory.

setFback to summary
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.

Parameters
f:String

The file name to be launched.

setFileback to summary
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:PDFileSpecification

The file specification.

setOback to summary
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.

Parameters
o:String

The operation to perform.

setOpenInNewWindowback to summary
public void setOpenInNewWindow(OpenMode value)

This will specify whether to open the destination document in a new window.

Parameters
value:OpenMode

The flag value.

setPback to summary
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.

Parameters
p:String

The parameter string.

setWinLaunchParamsback to summary
public void setWinLaunchParams(PDWindowsLaunchParams win)

This will set a dictionary containing Windows-specific launch parameters.

Parameters
win:PDWindowsLaunchParams

The action to be performed.