- java.lang.Object
-
- com.itextpdf.tools.Executable
-
public class Executable extends java.lang.ObjectThis class enables you to call an executable that will show a PDF file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringacroreadThe path to Acrobat Reader.
-
Constructor Summary
Constructors Constructor Description Executable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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(java.lang.String url)Launches a browser opening an URL.static java.lang.ProcessopenDocument(java.io.File file)Opens a PDF document.static java.lang.ProcessopenDocument(java.io.File file, boolean waitForTermination)Opens a PDF document.static java.lang.ProcessopenDocument(java.lang.String fileName)Opens a PDF document.static java.lang.ProcessopenDocument(java.lang.String fileName, boolean waitForTermination)Opens a PDF document.static java.lang.ProcessprintDocument(java.io.File file)Prints a PDF document.static java.lang.ProcessprintDocument(java.io.File file, boolean waitForTermination)Prints a PDF document.static java.lang.ProcessprintDocument(java.lang.String fileName)Prints a PDF document.static java.lang.ProcessprintDocument(java.lang.String fileName, boolean waitForTermination)Prints a PDF document.static java.lang.ProcessprintDocumentSilent(java.io.File file)Prints a PDF document without opening a Dialog box.static java.lang.ProcessprintDocumentSilent(java.io.File file, boolean waitForTermination)Prints a PDF document without opening a Dialog box.static java.lang.ProcessprintDocumentSilent(java.lang.String fileName)Prints a PDF document without opening a Dialog box.static java.lang.ProcessprintDocumentSilent(java.lang.String fileName, boolean waitForTermination)Prints a PDF document without opening a Dialog box.
-
-
-
Method Detail
-
openDocument
public static final java.lang.Process openDocument(java.lang.String fileName, boolean waitForTermination) throws java.io.IOExceptionOpens a PDF document.- Parameters:
fileName-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
openDocument
public static final java.lang.Process openDocument(java.io.File file, boolean waitForTermination) throws java.io.IOExceptionOpens a PDF document.- Parameters:
file-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
openDocument
public static final java.lang.Process openDocument(java.lang.String fileName) throws java.io.IOExceptionOpens a PDF document.- Parameters:
fileName-- Returns:
- a process
- Throws:
java.io.IOException
-
openDocument
public static final java.lang.Process openDocument(java.io.File file) throws java.io.IOExceptionOpens a PDF document.- Parameters:
file-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocument
public static final java.lang.Process printDocument(java.lang.String fileName, boolean waitForTermination) throws java.io.IOExceptionPrints a PDF document.- Parameters:
fileName-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocument
public static final java.lang.Process printDocument(java.io.File file, boolean waitForTermination) throws java.io.IOExceptionPrints a PDF document.- Parameters:
file-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocument
public static final java.lang.Process printDocument(java.lang.String fileName) throws java.io.IOExceptionPrints a PDF document.- Parameters:
fileName-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocument
public static final java.lang.Process printDocument(java.io.File file) throws java.io.IOExceptionPrints a PDF document.- Parameters:
file-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocumentSilent
public static final java.lang.Process printDocumentSilent(java.lang.String fileName, boolean waitForTermination) throws java.io.IOExceptionPrints a PDF document without opening a Dialog box.- Parameters:
fileName-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocumentSilent
public static final java.lang.Process printDocumentSilent(java.io.File file, boolean waitForTermination) throws java.io.IOExceptionPrints a PDF document without opening a Dialog box.- Parameters:
file-waitForTermination-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocumentSilent
public static final java.lang.Process printDocumentSilent(java.lang.String fileName) throws java.io.IOExceptionPrints a PDF document without opening a Dialog box.- Parameters:
fileName-- Returns:
- a process
- Throws:
java.io.IOException
-
printDocumentSilent
public static final java.lang.Process printDocumentSilent(java.io.File file) throws java.io.IOExceptionPrints a PDF document without opening a Dialog box.- Parameters:
file-- Returns:
- a process
- Throws:
java.io.IOException
-
launchBrowser
public static final void launchBrowser(java.lang.String url) throws java.io.IOExceptionLaunches a browser opening an URL.- Parameters:
url- the URL you want to open in the browser- Throws:
java.io.IOException
-
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
-
-