Package com.openkm.sdk4j.impl
Class ConversionImpl
java.lang.Object
com.openkm.sdk4j.impl.ClientImpl
com.openkm.sdk4j.impl.ConversionImpl
- All Implemented Interfaces:
BaseConversion,Serializable
ConversionImpl
- Author:
- sochoa
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbarcode2txt(InputStream is, String fileName) Extracts the barcode text from the uploaded image.doc2pdf(InputStream is, String fileName) Retrieve the uploaded document converted to PDF format.doc2txt(InputStream is, String fileName) Extracts the text from the upload document.Retrieve the PDF of an URL.imageConvert(InputStream is, String fileName, String params, String dstMimeType) Retrieve the uploaded image with transformation.img2txt(InputStream is, String fileName) Extracts the text from the uploaded image.protected voidsetAuthorizationToken(String authorizationToken) setAuthenticationTokenMethods inherited from class com.openkm.sdk4j.impl.ClientImpl
getClient, getWebTarget, setAuthorizationHeader, setJsessionIdHeader
-
Constructor Details
-
ConversionImpl
ConversionImpl
-
-
Method Details
-
setAuthorizationToken
setAuthenticationToken -
doc2pdf
public InputStream doc2pdf(InputStream is, String fileName) throws ConversionException, WebserviceException, UnknownException Description copied from interface:BaseConversionRetrieve the uploaded document converted to PDF format.- Specified by:
doc2pdfin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- InputStream input stream
- Throws:
ConversionException- the conversion exceptionWebserviceException- the webservice exceptionUnknownException- the unknown exception
-
imageConvert
public InputStream imageConvert(InputStream is, String fileName, String params, String dstMimeType) throws WebserviceException, UnknownException Description copied from interface:BaseConversionRetrieve the uploaded image with transformation.- Specified by:
imageConvertin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file nameparams- the paramsdstMimeType- the dst mime type- Returns:
- InputStream input stream
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
html2pdf
public InputStream html2pdf(String url) throws ConversionException, WebserviceException, UnknownException Description copied from interface:BaseConversionRetrieve the PDF of an URL.- Specified by:
html2pdfin interfaceBaseConversion- Parameters:
url- the url- Returns:
- InputStream input stream
- Throws:
ConversionException- the conversion exceptionWebserviceException- the webservice exceptionUnknownException- the unknown exception
-
doc2txt
Description copied from interface:BaseConversionExtracts the text from the upload document.- Specified by:
doc2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
img2txt
Description copied from interface:BaseConversionExtracts the text from the uploaded image.- Specified by:
img2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- The filename- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-
barcode2txt
public String barcode2txt(InputStream is, String fileName) throws WebserviceException, UnknownException Description copied from interface:BaseConversionExtracts the barcode text from the uploaded image.- Specified by:
barcode2txtin interfaceBaseConversion- Parameters:
is- The content of the filefileName- the file name- Returns:
- String string
- Throws:
WebserviceException- the webservice exceptionUnknownException- the unknown exception
-