com.groupdocs.conversion.handler

Class ConversionHandler



  • public class ConversionHandler
    extends Object

    Create instance of ConversionHandler class to convert between different file formats

    • Field Detail

      • LocaleHandler

        public com.groupdocs.conversion.handler.LocaleHandler LocaleHandler

        Locale handler

    • Constructor Detail

      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig)

        Instantiate the ConversionHandler with default IInputDataHandler, IOutputDataHandler and ICacheDataHandler All files will be loaded from local file system All cache items will be stored and loaded from local data system

        Parameters:
        conversionConfig - Instance of ConversionConfig
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IInputDataHandler inputDataHandler)

        Instantiate the ConversionHandler with default IOutputDataHandler, ICacheDataHandler and custom IInputDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        inputDataHandler - Custom implementation of IInputDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         ICacheDataHandler cacheDataHandler)

        Instantiate the ConversionHandler with default IInputDataHandler, IOutputDataHandler and custom ICacheDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        cacheDataHandler - Custom implementation of IInputDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IOutputDataHandler outputDataHandler)

        Instantiate the ConversionHandler with default IInputDataHandler, ICacheDataHandler and custom IOutputDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        outputDataHandler - Custom implementation of IOutputDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IInputDataHandler inputDataHandler,
                         IOutputDataHandler outputDataHandler)

        Instantiate the ConversionHandler with default ICacheDataHandler and custom IInputDataHandler, IOutputDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        inputDataHandler - Custom implementation of IInputDataHandler interface
        outputDataHandler - Custom implementation of IOutputDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IInputDataHandler inputDataHandler,
                         ICacheDataHandler cacheDataHandler)

        Instantiate the ConversionHandler with default IOutputDataHandler and custom IInputDataHandler, ICacheDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        inputDataHandler - Custom implementation of IInputDataHandler interface
        cacheDataHandler - Custom implementation of ICacheDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IOutputDataHandler outputDataHandler,
                         ICacheDataHandler cacheDataHandler)

        Instantiate the ConversionHandler with default IInputDataHandler and custom IOutputDataHandler, ICacheDataHandler implementation

        Parameters:
        conversionConfig - Instance of ConversionConfig
        outputDataHandler - Custom implementation of IOutputDataHandler interface
        cacheDataHandler - Custom implementation of ICacheDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IInputDataHandler inputDataHandler,
                         IOutputDataHandler outputDataHandler,
                         ICacheDataHandler cacheDataHandler)

        Instantiate the ConversionHandler with custom IInputDataHandler, IOutputDataHandler and custom ICacheDataHandler implementations

        Parameters:
        conversionConfig - Instance of ConversionConfig
        inputDataHandler - Custom implementation of IInputDataHandler interface
        outputDataHandler - Custom implementation of IOutputDataHandler interface
        cacheDataHandler - Custom implementation of ICacheDataHandler interface
      • ConversionHandler

        public ConversionHandler(ConversionConfig conversionConfig,
                         IOutputDataHandler outputDataHandler,
                         ICacheDataHandler cacheDataHandler,
                         com.groupdocs.conversion.converter.IConverterFactory converterFactory,
                         com.groupdocs.conversion.domain.IDocumentLoader documentLoader)
    • Method Detail

      • getDocumentLoader

        public com.groupdocs.conversion.domain.IDocumentLoader getDocumentLoader()

        Document loader

        Returns:
      • getOutputDataHandler

        public IOutputDataHandler getOutputDataHandler()

        Output data handler

        Returns:
      • getCacheDataHandler

        public ICacheDataHandler getCacheDataHandler()

        Cache data handler

        Returns:
      • getFoundationHandler

        public static com.groupdocs.foundation.handler.FoundationHandler getFoundationHandler()

        Foundation handler

        Returns:
      • getConverterFactory

        public com.groupdocs.conversion.converter.IConverterFactory getConverterFactory()

        Converter factory

        Returns:
      • convert

        public <T> T convert(String guid,
                    LoadOptions loadOptions,
                    SaveOptions saveOptions)

        Converts the file specified by the guid

        Type Parameters:
        T -
        Parameters:
        guid -
        loadOptions -
        saveOptions -
        Returns:
      • convert

        public <T> T convert(String guid,
                    SaveOptions saveOptions)

        Converts the file specified by the guid

        Type Parameters:
        T -
        Parameters:
        guid -
        saveOptions -
        Returns:
      • convert

        public <T> T convert(InputStream fileStream,
                    String fileName,
                    LoadOptions loadOptions,
                    SaveOptions saveOptions)

        Converts the content of the stream

        Type Parameters:
        T -
        Parameters:
        fileStream -
        fileName -
        loadOptions -
        saveOptions -
        Returns:
      • convert

        public <T> T convert(InputStream fileStream,
                    String fileName,
                    SaveOptions saveOptions)

        Converts the content of the stream

        Type Parameters:
        T -
        Parameters:
        fileStream -
        fileName -
        saveOptions -
        Returns:
      • convert

        public <T> T convert(InputStream fileStream,
                    LoadOptions loadOptions,
                    SaveOptions saveOptions)

        Converts the content of the stream

        Type Parameters:
        T -
        Parameters:
        fileStream -
        loadOptions -
        saveOptions -
        Returns:
      • convert

        public <T> T convert(InputStream fileStream,
                    SaveOptions saveOptions)

        Converts the content of the stream

        Type Parameters:
        T -
        Parameters:
        fileStream -
        saveOptions -

        T:

        Returns:
      • setConversionProgressListener

        public void setConversionProgressListener(IConversionProgressListener progressListener)

        Set conversion progress listener

        Parameters:
        progressListener -
      • setConversionStatusListener

        public void setConversionStatusListener(IConversionStatusListener statusListener)

        Set conversion status listener

        Parameters:
        statusListener -
      • getSaveOptions

        public Dictionary<String,SaveOptions> getSaveOptions(String sourceDocumentExtension)

        Returns all possible SaveOptions for provided source document type

        Parameters:
        sourceDocumentExtension - Source document extension
        Returns:
      • getSaveOptions

        public Dictionary<String,SaveOptions> getSaveOptions(InputStream sourceDocument)

        Returns all possible SaveOptions for provided source document type

        Parameters:
        sourceDocument - Source document stream
        Returns:
      • getPossibleConversions

        public com.aspose.ms.System.Collections.Generic.IGenericDictionary<String,String[]> getPossibleConversions()

        Return all possible conversions

        Returns:
      • getPossibleConversions

        public String[] getPossibleConversions(String sourceDocumentExtension)

        Return all possible conversions for provided source document type

        Parameters:
        sourceDocumentExtension - Source document extension
        Returns:
      • getDocumentType

        public String getDocumentType(InputStream stream)

        Detects the document type from a stream

        Parameters:
        stream -
        Returns:
      • getPossibleConversions

        public String[] getPossibleConversions(InputStream sourceDocument)

        Return all possible conversions for provided source document type

        Parameters:
        sourceDocument - Source document stream
        Returns:
      • isLicensed

        public boolean isLicensed()

        Indicates is the product licensed or not

        Returns:
      • getDocumentPagesCount

        public int getDocumentPagesCount(String guid)

        Returns pages count of the provided document

        Parameters:
        guid -
        Returns:
        pages count
      • getDocumentPagesCount

        public int getDocumentPagesCount(String guid,
                                LoadOptions loadOptions)

        Returns pages count of the provided document

        Parameters:
        guid -
        loadOptions -
        Returns:
        pages count
      • getDocumentPagesCount

        public int getDocumentPagesCount(InputStream fileStream,
                                LoadOptions loadOptions)

        Returns pages count of the provided document

        Parameters:
        fileStream -
        loadOptions -
        Returns:
        pages count
      • getDocumentPagesCount

        public int getDocumentPagesCount(InputStream fileStream)

        Returns pages count of the provided document

        Parameters:
        fileStream -
        Returns:
        pages count
      • getDocumentInfo

        public com.groupdocs.conversion.handler.DocumentInfo getDocumentInfo(InputStream fileStream,
                                                                    LoadOptions loadOptions)

        Returns information for provided document

        Parameters:
        fileStream -
        loadOptions -
        Returns:
      • getDocumentInfo

        public com.groupdocs.conversion.handler.DocumentInfo getDocumentInfo(InputStream fileStream)

        Returns information for provided document

        Parameters:
        fileStream -
        Returns:
      • getDocumentInfo

        public com.groupdocs.conversion.handler.DocumentInfo getDocumentInfo(String guid,
                                                                    LoadOptions loadOptions)

        Returns information for provided document

        Parameters:
        guid -
        loadOptions -
        Returns:
      • getDocumentInfo

        public com.groupdocs.conversion.handler.DocumentInfo getDocumentInfo(String guid)

        Returns information for provided document

        Parameters:
        guid -
        Returns: