public class JODBasedConverter extends Object implements ExternalConverter
Modifier and Type | Field and Description |
---|---|
protected ConverterDescriptor |
descriptor |
protected static Map<org.artofsolving.jodconverter.document.DocumentFamily,String> |
PDF_FILTER_NAMES |
static String |
PDFA1_PARAM
Boolean conversion parameter for PDF/A-1.
|
protected static String |
TMP_PATH_PARAMETER |
static String |
UPDATE_INDEX_PARAM
Boolean parameter to force update of the document TOC
|
Constructor and Description |
---|
JODBasedConverter() |
Modifier and Type | Method and Description |
---|---|
protected Blob |
checkCharsetMeta(Blob inputBlob)
Checks if the
inputBlob string contains a charset meta tag. |
BlobHolder |
convert(BlobHolder blobHolder,
Map<String,Serializable> parameters)
Main method to handle the real Conversion Job.
|
protected org.artofsolving.jodconverter.document.DocumentFormat |
extendPDFFormat(org.artofsolving.jodconverter.document.DocumentFormat sourceFormat,
org.artofsolving.jodconverter.document.DocumentFormat defaultFormat,
boolean pdfa1) |
protected Map<String,Object> |
extendPDFStoreProperties(String mediatype,
boolean pdfa1,
Map<String,?> originalProperties) |
protected void |
finalize() |
protected org.artofsolving.jodconverter.document.DocumentFormat |
getDestinationFormat(org.artofsolving.jodconverter.OfficeDocumentConverter documentConverter,
org.artofsolving.jodconverter.document.DocumentFormat sourceFormat,
boolean pdfa1)
Returns the destination format for the given plugin.
|
protected String |
getDestinationMimeType() |
protected String |
getTmpDirectory() |
void |
init(ConverterDescriptor descriptor)
Initializes the Converter.
|
ConverterCheckResult |
isConverterAvailable()
Checks if the converter is available.
|
protected org.artofsolving.jodconverter.OfficeDocumentConverter |
newDocumentConverter() |
protected static final String TMP_PATH_PARAMETER
public static final String PDFA1_PARAM
public static final String UPDATE_INDEX_PARAM
protected static final Map<org.artofsolving.jodconverter.document.DocumentFamily,String> PDF_FILTER_NAMES
protected ConverterDescriptor descriptor
public JODBasedConverter()
protected String getDestinationMimeType()
protected org.artofsolving.jodconverter.document.DocumentFormat getDestinationFormat(org.artofsolving.jodconverter.OfficeDocumentConverter documentConverter, org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, boolean pdfa1)
It takes the actual destination mimetype from the plugin configuration.
sourceFormat
- the source formatpdfa1
- true if PDF/A-1 is requiredprotected org.artofsolving.jodconverter.document.DocumentFormat extendPDFFormat(org.artofsolving.jodconverter.document.DocumentFormat sourceFormat, org.artofsolving.jodconverter.document.DocumentFormat defaultFormat, boolean pdfa1)
protected Map<String,Object> extendPDFStoreProperties(String mediatype, boolean pdfa1, Map<String,?> originalProperties)
public BlobHolder convert(BlobHolder blobHolder, Map<String,Serializable> parameters) throws ConversionException
Converter
Returned BlobHolder
must implement CachableBlobHolder
, otherwise result won't be cached.
convert
in interface Converter
ConversionException
protected org.artofsolving.jodconverter.OfficeDocumentConverter newDocumentConverter() throws ConversionException
ConversionException
public void init(ConverterDescriptor descriptor)
Converter
This can be used to retrieve some configuration information from the XMap Descriptor.
public ConverterCheckResult isConverterAvailable()
ExternalConverter
isConverterAvailable
in interface ExternalConverter
protected String getTmpDirectory()
protected Blob checkCharsetMeta(Blob inputBlob) throws IOException
inputBlob
string contains a charset
meta tag. If not, add it.inputBlob
- the input blobIOException
- Signals that an I/O exception has occurred.Copyright © 2015 Nuxeo SA. All rights reserved.