Package com.ironsoftware.ironpdf
Class Settings
- java.lang.Object
-
- com.ironsoftware.ironpdf.Settings
-
public final class Settings extends Object
Important global settings for configuration of IronPDF for Java
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Settings.ChromeGpuModes
Chrome GPU hardware utilization when rendering HTML to PDF
-
Constructor Summary
Constructors Constructor Description Settings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Path
getChromeBrowserCachePath()
Disk cache path for Chrome browser instances default nullstatic int
getChromeBrowserLimit()
Get Maximum number of concurrent browsers when using the Chrome renderer default is 30static Settings.ChromeGpuModes
getChromeGpuMode()
Chrome renderer GPU compatibility mode.static String
getIronPdfEngineHost()
Get IronPDF engine host string.static int
getIronPdfEnginePort()
Get IronPdf engine port int.static int
getIronPdfEngineTimeout()
A Timeout (in seconds) to wait for any response from IronPdfEngine default 120 secondsstatic String
getIronPdfEngineVersion()
Gets IronPDF engine version.static Path
getIronPdfEngineWorkingDirectory()
Gets path to IronPDF engine working directory.static Path
getLogPath()
Gets IronPDF engine log file path.static Path
getTempFolderPath()
Get temp folder path.static boolean
isAutoInstallDependency()
If true The necessary package dependencies for IronPDF rendering will we automatically installed to Docker and Debian / Ubuntu Linux deployments.static boolean
isDebug()
Is debug boolean.static boolean
isSingleProcess()
SingleProcess mode Forces Chrome renderer to perform everything in the current process, rather than using subprocesses default is falsestatic void
setAutoInstallDependency(boolean isAutoInstallDependency)
If true The necessary package dependencies for IronPDF rendering will we automatically installed to Docker and Debian / Ubuntu Linux deployments.static void
setChromeBrowserCachePath(Path chromeBrowserCachePath)
Disk cache path for Chrome browser instances default nullstatic void
setChromeBrowserLimit(int chromeBrowserLimit)
Set Maximum number of concurrent browsers when using the Chrome renderer default is 30static void
setChromeGpuMode(Settings.ChromeGpuModes chromeGpuMode)
Chrome renderer GPU compatibility mode.static void
setDebug(boolean isDebug)
Enable or disable debug mode.static void
setIronPdfEngineHost(String host)
Set IronPDF engine host.static void
setIronPdfEnginePort(int port)
Set IronPdf engine port.static void
setIronPdfEngineTimeout(int ironPdfEngineTimeout)
A Timeout (in seconds) to wait for any response from IronPdfEngine default 120 secondsstatic void
setIronPdfEngineWorkingDirectory(Path path)
Sets path to IronPDF engine working directory.static void
setLogPath(Path path)
Sets IronPDF engine log file path.static void
setSingleProcess(boolean isSingleProcess)
SingleProcess mode Forces Chrome renderer to perform everything in the current process, rather than using subprocesses default is falsestatic void
setTempFolderPath(Path tempFolderPath)
Set temp folder path.static void
useIronPdfEngineDocker()
Use IronPDF engine docker.static void
useIronPdfEngineDocker(int port)
Use IronPDF engine docker.
-
-
-
Method Detail
-
getIronPdfEngineVersion
public static String getIronPdfEngineVersion()
Gets IronPDF engine version.- Returns:
- The current IronPdfEngine version
-
isDebug
public static boolean isDebug()
Is debug boolean.- Returns:
- true if debug mode is enabled.
-
setDebug
public static void setDebug(boolean isDebug)
Enable or disable debug mode.***Recommended to set before calling any IronPdf function.***
- Parameters:
isDebug
- is debug enabled
-
getIronPdfEngineWorkingDirectory
public static Path getIronPdfEngineWorkingDirectory()
Gets path to IronPDF engine working directory. default is current directory. If IronPdfEngine binary does not exist, We will download automatically to this folder.- Returns:
- custom IronPdfEngine folder.
-
setIronPdfEngineWorkingDirectory
public static void setIronPdfEngineWorkingDirectory(Path path) throws IOException
Sets path to IronPDF engine working directory. default is current directory. If IronPdfEngine binary does not exist, We will download automatically to this folder.***Recommended to set before calling any IronPdf function.***
- Parameters:
path
- the path- Throws:
IOException
- the io exception
-
getLogPath
public static Path getLogPath()
Gets IronPDF engine log file path.- Returns:
- the log file path
-
setLogPath
public static void setLogPath(Path path)
Sets IronPDF engine log file path.***Recommended to set before calling any IronPdf function.***
- Parameters:
path
- the log file path
-
setIronPdfEngineHost
public static void setIronPdfEngineHost(String host)
Set IronPDF engine host.- Parameters:
host
- the host
-
getIronPdfEngineHost
public static String getIronPdfEngineHost()
Get IronPDF engine host string.- Returns:
- the host string
-
setIronPdfEnginePort
public static void setIronPdfEnginePort(int port)
Set IronPdf engine port. Default port will pick automatically.- Parameters:
port
- the port
-
getIronPdfEnginePort
public static int getIronPdfEnginePort()
Get IronPdf engine port int. Default port will pick automatically.- Returns:
- the port int
-
setTempFolderPath
public static void setTempFolderPath(Path tempFolderPath)
Set temp folder path.- Parameters:
tempFolderPath
- the temp folder path
-
getTempFolderPath
public static Path getTempFolderPath()
Get temp folder path.- Returns:
- the path
-
useIronPdfEngineDocker
public static void useIronPdfEngineDocker()
Use IronPDF engine docker. All PDF operation will happen on the connected IronPDF engine docker. This setting required IronPdfEngine is already up and running in docker. (with default port) License key need to set as a Docker environment.Get IronPDF engine docker @see official-ironpdfengine-docker}
-
useIronPdfEngineDocker
public static void useIronPdfEngineDocker(int port)
Use IronPDF engine docker. All PDF operation will happen on the connected IronPDF engine docker. This setting required IronPdfEngine is already up and running in docker. (on the given port) License key need to set as a Docker environment.Get IronPDF engine docker @see official-ironpdfengine-docker}
- Parameters:
port
- Set the port for IronPdfEngineDocker to listen on
-
isSingleProcess
public static boolean isSingleProcess()
SingleProcess mode Forces Chrome renderer to perform everything in the current process, rather than using subprocesses default is false- Returns:
- true if SingleProcess mode is enabled.
-
setSingleProcess
public static void setSingleProcess(boolean isSingleProcess)
SingleProcess mode Forces Chrome renderer to perform everything in the current process, rather than using subprocesses default is false- Parameters:
isSingleProcess
- is SingleProcess enabled
-
setChromeBrowserLimit
public static void setChromeBrowserLimit(int chromeBrowserLimit)
Set Maximum number of concurrent browsers when using the Chrome renderer default is 30- Parameters:
chromeBrowserLimit
-
-
getChromeBrowserLimit
public static int getChromeBrowserLimit()
Get Maximum number of concurrent browsers when using the Chrome renderer default is 30- Returns:
- chromeBrowserLimit
-
getChromeBrowserCachePath
public static Path getChromeBrowserCachePath()
Disk cache path for Chrome browser instances default null- Returns:
- chromeBrowserCachePath.
-
setChromeBrowserCachePath
public static void setChromeBrowserCachePath(Path chromeBrowserCachePath) throws IOException
Disk cache path for Chrome browser instances default null- Parameters:
chromeBrowserCachePath
-- Throws:
IOException
- the io exception
-
getChromeGpuMode
public static Settings.ChromeGpuModes getChromeGpuMode()
Chrome renderer GPU compatibility mode. In special environment like Docker or Cloud Service please use ChromeGpuModes.Disabled default null- Returns:
- chromeBrowserCachePath.
-
setChromeGpuMode
public static void setChromeGpuMode(Settings.ChromeGpuModes chromeGpuMode) throws IOException
Chrome renderer GPU compatibility mode. In special environment like Docker or Cloud Service please use ChromeGpuModes.Disabled default Disabled- Parameters:
chromeGpuMode
-- Throws:
IOException
- the io exception
-
isAutoInstallDependency
public static boolean isAutoInstallDependency()
If true The necessary package dependencies for IronPDF rendering will we automatically installed to Docker and Debian / Ubuntu Linux deployments. This will take a few minutes the next time you run IronPDF. Set this to false if manual Docker / Linux setup is more convenient: more info default is true- Returns:
- true if AutoInstallDependency mode is enabled.
-
setAutoInstallDependency
public static void setAutoInstallDependency(boolean isAutoInstallDependency)
If true The necessary package dependencies for IronPDF rendering will we automatically installed to Docker and Debian / Ubuntu Linux deployments. This will take a few minutes the next time you run IronPDF. Set this to false if manual Docker / Linux setup is more convenient: more info default is true- Parameters:
isAutoInstallDependency
- is SingleProcess enabled
-
getIronPdfEngineTimeout
public static int getIronPdfEngineTimeout()
A Timeout (in seconds) to wait for any response from IronPdfEngine default 120 seconds- Returns:
- IronPdfEngineTimeout (seconds)
-
setIronPdfEngineTimeout
public static void setIronPdfEngineTimeout(int ironPdfEngineTimeout)
A Timeout (in seconds) to wait for any response from IronPdfEngine default 120 seconds- Parameters:
ironPdfEngineTimeout
- (seconds)
-
-