public class ConversionHandler extends Object
Constructor and Description |
---|
ConversionHandler(IConfig config)
Instantiates a new Conversion handler.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
convertToHtml(InputStream fileStream,
String fileName,
HtmlSaveOptions options)
Convert document to HTML
|
<T> T |
convertToHtml(String path,
HtmlSaveOptions options)
Convert document to HTML
|
<T> T |
convertToImage(InputStream fileStream,
String fileName,
ImageSaveOptions options)
Convert document to image
|
<T> T |
convertToImage(String path,
ImageSaveOptions options)
Convert document to image
|
<T> T |
convertToPdf(InputStream fileStream,
String fileName,
PdfSaveOptions options)
Convert document to PDF
|
<T> T |
convertToPdf(String path,
PdfSaveOptions options)
Convert document to PDF
|
int |
getPageCount(InputStream fileStream,
String fileName)
Get document page count
|
int |
getPageCount(String path)
Get document page count
|
<T> T |
merge(List<String> filePathList,
MergeOptions mergeOptions)
Merge documents into one document
|
<T> T |
merge(Map<String,InputStream> fileStreamMap,
MergeOptions mergeOptions)
Merge documents into one document
|
public ConversionHandler(IConfig config)
config
- the configpublic int getPageCount(String path)
path
- path to filepublic int getPageCount(InputStream fileStream, String fileName) throws ConversionException
fileStream
- file streamfileName
- original document name (ex: my_doc.pdf)ConversionException
- the conversion exceptionpublic <T> T convertToImage(String path, ImageSaveOptions options) throws InternalException
T
- the type parameterpath
- path to fileoptions
- image saving optionsInternalException
- the internal exceptionpublic <T> T convertToImage(InputStream fileStream, String fileName, ImageSaveOptions options) throws ConversionException
T
- the type parameterfileStream
- original document streamfileName
- original document name (ex: my_doc.pdf)options
- image saving optionsConversionException
- the conversion exceptionpublic <T> T convertToPdf(String path, PdfSaveOptions options) throws InternalException
T
- the type parameterpath
- path to fileoptions
- pdf optionsInternalException
- the internal exceptionpublic <T> T convertToPdf(InputStream fileStream, String fileName, PdfSaveOptions options) throws ConversionException
T
- the type parameterfileStream
- original document streamfileName
- original document name (ex: my_doc.doc)options
- pdf optionsConversionException
- the conversion exceptionpublic <T> T convertToHtml(String path, HtmlSaveOptions options) throws InternalException
T
- the type parameterpath
- path to fileoptions
- html optionsInternalException
- the internal exceptionpublic <T> T convertToHtml(InputStream fileStream, String fileName, HtmlSaveOptions options) throws ConversionException
T
- the type parameterfileStream
- original document streamfileName
- original document name (ex: my_doc.doc)options
- html optionsConversionException
- the conversion exceptionpublic <T> T merge(List<String> filePathList, MergeOptions mergeOptions) throws Exception
T
- the type parameterfilePathList
- list of file path to mergemergeOptions
- merge optionsException
- the exceptionpublic <T> T merge(Map<String,InputStream> fileStreamMap, MergeOptions mergeOptions) throws Exception
T
- the type parameterfileStreamMap
- map of file to be merged mergeOptions
- merge optionsException
- the exceptionCopyright © 2015 GroupDocs. All rights reserved.