java.lang.Object
com.lowagie.tools.Executable
This class enables you to call an executable that will show a PDF file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisLinux()Checks the Operating System.static booleanisMac()Checks the Operating System.static booleanChecks the Operating System.static booleanChecks the Operating System.static voidlaunchBrowser(String url) Launches a browser opening an URL.static ProcessopenDocument(File file) Opens a PDF document.static ProcessopenDocument(File file, boolean waitForTermination) Opens a PDF document.static ProcessopenDocument(String fileName) Opens a PDF document.static ProcessopenDocument(String fileName, boolean waitForTermination) Opens a PDF document.static ProcessprintDocument(File file) Prints a PDF document.static ProcessprintDocument(File file, boolean waitForTermination) Prints a PDF document.static ProcessprintDocument(String fileName) Prints a PDF document.static ProcessprintDocument(String fileName, boolean waitForTermination) Prints a PDF document.static ProcessprintDocumentSilent(File file) 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(String fileName, boolean waitForTermination) Prints a PDF document without opening a Dialog box.
-
Constructor Details
-
Executable
public Executable()
-
-
Method Details
-
openDocument
Opens a PDF document.- Parameters:
fileName- the name of the file to openwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
openDocument
Opens a PDF document.- Parameters:
file- the file to openwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
openDocument
Opens a PDF document.- Parameters:
fileName- the name of the file to open- Returns:
- a process
- Throws:
IOException- on error
-
openDocument
Opens a PDF document.- Parameters:
file- the file to open- Returns:
- a process
- Throws:
IOException- on error
-
printDocument
Prints a PDF document.- Parameters:
fileName- the name of the file to printwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
printDocument
Prints a PDF document.- Parameters:
file- the File to printwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
printDocument
Prints a PDF document.- Parameters:
fileName- the name of the file to print- Returns:
- a process
- Throws:
IOException- on error
-
printDocument
Prints a PDF document.- Parameters:
file- the File to print- Returns:
- a process
- Throws:
IOException- on error
-
printDocumentSilent
public static Process printDocumentSilent(String fileName, boolean waitForTermination) throws IOException Prints a PDF document without opening a Dialog box.- Parameters:
fileName- the name of the file to printwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
printDocumentSilent
Prints a PDF document without opening a Dialog box.- Parameters:
file- the File to printwaitForTermination- true to wait for termination, false otherwise- Returns:
- a process
- Throws:
IOException- on error
-
printDocumentSilent
Prints a PDF document without opening a Dialog box.- Parameters:
fileName- the name of the file to print- Returns:
- a process
- Throws:
IOException- on error
-
printDocumentSilent
Prints a PDF document without opening a Dialog box.- Parameters:
file- the File to print- Returns:
- a process
- Throws:
IOException- on error
-
launchBrowser
Launches a browser opening an URL.- Parameters:
url- the URL you want to open in the browser- Throws:
IOException- on error
-
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
-
isMac
public static boolean isMac()Checks the Operating System.- Returns:
- true if the current os is Apple
-
isLinux
public static boolean isLinux()Checks the Operating System.- Returns:
- true if the current os is Linux
-