com.lowagie.tools

Class Executable

public class Executable extends Object

This class enables you to call an executable that will show a PDF file.
Field Summary
static Stringacroread
The path to Acrobat Reader.
Method Summary
static Processaction(String fileName, String parameters, boolean waitForTermination)
Performs an action on a PDF document.
static booleanisLinux()
Checks the Operating System.
static booleanisMac()
Checks the Operating System.
static booleanisWindows()
Checks the Operating System.
static booleanisWindows9X()
Checks the Operating System.
static voidlaunchBrowser(String url)
Launches a browser opening an URL.
static ProcessopenDocument(String fileName, boolean waitForTermination)
Opens a PDF document.
static ProcessopenDocument(File file, boolean waitForTermination)
Opens a PDF document.
static ProcessopenDocument(String fileName)
Opens a PDF document.
static ProcessopenDocument(File file)
Opens a PDF document.
static ProcessprintDocument(String fileName, boolean waitForTermination)
Prints a PDF document.
static ProcessprintDocument(File file, boolean waitForTermination)
Prints a PDF document.
static ProcessprintDocument(String fileName)
Prints a PDF document.
static ProcessprintDocument(File file)
Prints a PDF document.
static ProcessprintDocumentSilent(String fileName, boolean waitForTermination)
Prints a PDF document without opening a Dialog box.
static ProcessprintDocumentSilent(File file, boolean waitForTermination)
Prints a PDF document without opening a Dialog box.
static ProcessprintDocumentSilent(String fileName)
Prints a PDF document without opening a Dialog box.
static ProcessprintDocumentSilent(File file)
Prints a PDF document without opening a Dialog box.

Field Detail

acroread

public static String acroread
The path to Acrobat Reader.

Method Detail

action

private static Process action(String fileName, String parameters, boolean waitForTermination)
Performs an action on a PDF document.

Parameters: fileName parameters waitForTermination

Returns: a process

Throws: IOException

isLinux

public static boolean isLinux()
Checks the Operating System.

Returns: true if the current os is Linux

isMac

public static boolean isMac()
Checks the Operating System.

Returns: true if the current os is Apple

isWindows

public static boolean isWindows()
Checks the Operating System.

Returns: true if the current os is Windows

isWindows9X

public static boolean isWindows9X()
Checks the Operating System.

Returns: true if the current os is Windows

launchBrowser

public static final void launchBrowser(String url)
Launches a browser opening an URL.

Parameters: url the URL you want to open in the browser

Throws: IOException

openDocument

public static final Process openDocument(String fileName, boolean waitForTermination)
Opens a PDF document.

Parameters: fileName waitForTermination

Returns: a process

Throws: IOException

openDocument

public static final Process openDocument(File file, boolean waitForTermination)
Opens a PDF document.

Parameters: file waitForTermination

Returns: a process

Throws: IOException

openDocument

public static final Process openDocument(String fileName)
Opens a PDF document.

Parameters: fileName

Returns: a process

Throws: IOException

openDocument

public static final Process openDocument(File file)
Opens a PDF document.

Parameters: file

Returns: a process

Throws: IOException

printDocument

public static final Process printDocument(String fileName, boolean waitForTermination)
Prints a PDF document.

Parameters: fileName waitForTermination

Returns: a process

Throws: IOException

printDocument

public static final Process printDocument(File file, boolean waitForTermination)
Prints a PDF document.

Parameters: file waitForTermination

Returns: a process

Throws: IOException

printDocument

public static final Process printDocument(String fileName)
Prints a PDF document.

Parameters: fileName

Returns: a process

Throws: IOException

printDocument

public static final Process printDocument(File file)
Prints a PDF document.

Parameters: file

Returns: a process

Throws: IOException

printDocumentSilent

public static final Process printDocumentSilent(String fileName, boolean waitForTermination)
Prints a PDF document without opening a Dialog box.

Parameters: fileName waitForTermination

Returns: a process

Throws: IOException

printDocumentSilent

public static final Process printDocumentSilent(File file, boolean waitForTermination)
Prints a PDF document without opening a Dialog box.

Parameters: file waitForTermination

Returns: a process

Throws: IOException

printDocumentSilent

public static final Process printDocumentSilent(String fileName)
Prints a PDF document without opening a Dialog box.

Parameters: fileName

Returns: a process

Throws: IOException

printDocumentSilent

public static final Process printDocumentSilent(File file)
Prints a PDF document without opening a Dialog box.

Parameters: file

Returns: a process

Throws: IOException