Class WrapperConfig
- java.lang.Object
-
- com.github.jhonnymertz.wkhtmltopdf.wrapper.configurations.WrapperConfig
-
public class WrapperConfig extends Object
Provides wrapper configuration such as the xvfb configuration and wkhtmltopdf command to be used
-
-
Constructor Summary
Constructors Constructor Description WrapperConfig()Deprecated.Use the constructor specifying the location of wkhtmltopdf.WrapperConfig(String wkhtmltopdfCommand)Initialize the configuration based on a provided wkhtmltopdf command to be used
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringfindExecutable()Attempts to find the `wkhtmltopdf` executable in the system path.StringgetWkhtmltopdfCommand()Gets the wkhtmltopdf command to be used while calling wkhtmltopdf It's default is 'wkhtmltopdf'XvfbConfiggetXvfbConfig()Gets the Xvfb configurationbooleanisXvfbEnabled()Verify whether the Xvfb support is enabled and configuredvoidsetWkhtmltopdfCommand(String wkhtmltopdfCommand)Sets the configuration based on a provided wkhtmltopdf command to be usedvoidsetXvfbConfig(XvfbConfig xvfbConfig)Sets the Xvfb configurationStringtoString()
-
-
-
Constructor Detail
-
WrapperConfig
@Deprecated public WrapperConfig()
Deprecated.Use the constructor specifying the location of wkhtmltopdf. Use the static method findExecutable() if necessary.Initialize the configuration based on searching for wkhtmltopdf command to be used into the SO's path
-
WrapperConfig
public WrapperConfig(String wkhtmltopdfCommand)
Initialize the configuration based on a provided wkhtmltopdf command to be used- Parameters:
wkhtmltopdfCommand- the wkhtmltopdf command
-
-
Method Detail
-
findExecutable
public static String findExecutable()
Attempts to find the `wkhtmltopdf` executable in the system path.- Returns:
- the wkhtmltopdf command according to the OS
-
getWkhtmltopdfCommand
public String getWkhtmltopdfCommand()
Gets the wkhtmltopdf command to be used while calling wkhtmltopdf It's default is 'wkhtmltopdf'- Returns:
- the wkhtmltopdf command
-
setWkhtmltopdfCommand
public void setWkhtmltopdfCommand(String wkhtmltopdfCommand)
Sets the configuration based on a provided wkhtmltopdf command to be used- Parameters:
wkhtmltopdfCommand- the wkhtmltopdf command
-
isXvfbEnabled
public boolean isXvfbEnabled()
Verify whether the Xvfb support is enabled and configured- Returns:
- status of Xvfb configuration
-
getXvfbConfig
public XvfbConfig getXvfbConfig()
Gets the Xvfb configuration- Returns:
- the Xvfb configuration
-
setXvfbConfig
public void setXvfbConfig(XvfbConfig xvfbConfig)
Sets the Xvfb configuration- Parameters:
xvfbConfig- the Xvfb configuration
-
-