Class WkHtmlToPdfConverter
java.lang.Object
ch.tocco.nice2.conversion.impl.phantomjs.WkHtmlToPdfConverter
- All Implemented Interfaces:
ConverterEngine<Html2PdfConfig>
@Component
public class WkHtmlToPdfConverter
extends Object
implements ConverterEngine<Html2PdfConfig>
-
Constructor Summary
ConstructorDescriptionWkHtmlToPdfConverter
(StandardBoilerplateService standardBoilerplateService, CssInline cssInline, org.slf4j.Logger log) -
Method Summary
Modifier and TypeMethodDescriptionvoid
convert
(Html2PdfConfig config) Convert the InputStream to the desired format and write to the provided OutputStream.getName()
Returns the name of the converter enginegetNewConverterConfig
(InputStream source, OutputStream target) get a new converter config object for this enginevoid
setKeepTemporaryFiles
(boolean value)
-
Constructor Details
-
WkHtmlToPdfConverter
public WkHtmlToPdfConverter(StandardBoilerplateService standardBoilerplateService, CssInline cssInline, org.slf4j.Logger log)
-
-
Method Details
-
getName
Description copied from interface:ConverterEngine
Returns the name of the converter engine- Specified by:
getName
in interfaceConverterEngine<Html2PdfConfig>
-
convert
Description copied from interface:ConverterEngine
Convert the InputStream to the desired format and write to the provided OutputStream.- Specified by:
convert
in interfaceConverterEngine<Html2PdfConfig>
- Parameters:
config
- config object obtained fromConverterEngine.getNewConverterConfig(InputStream, OutputStream)
- Throws:
ConversionException
- -
-
getNewConverterConfig
Description copied from interface:ConverterEngine
get a new converter config object for this engine- Specified by:
getNewConverterConfig
in interfaceConverterEngine<Html2PdfConfig>
- Parameters:
source
- the source to be convertedtarget
- the target to write to- Returns:
- a converter config object
-
setKeepTemporaryFiles
@Value("${nice2.conversion.wkhtmltopdf.keepTemporaryFiles}") public void setKeepTemporaryFiles(boolean value)
-