Class WrapperConfig


  • public class WrapperConfig
    extends Object
    Provides wrapper configuration such as the xvfb configuration and wkhtmltopdf command to be used
    • 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
      • getWkhtmltopdfCommandAsArray

        public String[] getWkhtmltopdfCommandAsArray()
        Gets the wkhtmltopdf command as an array 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