public class ConversionImpl extends ClientImpl implements BaseConversion, Serializable
Constructor and Description |
---|
ConversionImpl(String host)
ConversionImpl
|
Modifier and Type | Method and Description |
---|---|
String |
barcode2txt(InputStream is,
String fileName)
Extracts the barcode text from the uploaded image.
|
InputStream |
doc2pdf(InputStream is,
String fileName)
Retrieve the uploaded document converted to PDF format.
|
String |
doc2txt(InputStream is,
String fileName)
Extracts the text from the upload document.
|
InputStream |
html2pdf(String url)
Retrieve the PDF of an URL.
|
InputStream |
imageConvert(InputStream is,
String fileName,
String params,
String dstMimeType)
Retrieve the uploaded image with transformation.
|
String |
img2txt(InputStream is,
String fileName)
Extracts the text from the uploaded image.
|
void |
setAuthorizationToken(String authorizationToken)
setAuthenticationToken
|
getClient, resource, resource
public ConversionImpl(String host)
public void setAuthorizationToken(String authorizationToken)
public InputStream doc2pdf(InputStream is, String fileName) throws org.apache.commons.lang.NotImplementedException, ConversionException, WebserviceException, UnknownException
BaseConversion
doc2pdf
in interface BaseConversion
is
- The content of the filefileName
- the file nameorg.apache.commons.lang.NotImplementedException
- the not implemented exceptionConversionException
- the conversion exceptionWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionpublic InputStream imageConvert(InputStream is, String fileName, String params, String dstMimeType) throws javax.ws.rs.WebApplicationException, WebserviceException, UnknownException
BaseConversion
imageConvert
in interface BaseConversion
is
- The content of the filefileName
- the file nameparams
- the paramsdstMimeType
- the dst mime typeWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionjavax.ws.rs.WebApplicationException
public InputStream html2pdf(String url) throws ConversionException, WebserviceException, UnknownException
BaseConversion
html2pdf
in interface BaseConversion
url
- the urlConversionException
- the conversion exceptionWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionpublic String doc2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
BaseConversion
doc2txt
in interface BaseConversion
is
- The content of the filefileName
- the file nameWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionpublic String img2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
BaseConversion
img2txt
in interface BaseConversion
is
- The content of the filefileName
- The filenameWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionpublic String barcode2txt(InputStream is, String fileName) throws WebserviceException, UnknownException
BaseConversion
barcode2txt
in interface BaseConversion
is
- The content of the filefileName
- the file nameWebserviceException
- the webservice exceptionUnknownException
- the unknown exceptionCopyright © 2021 Open Knowledge Management System S.L.. All Rights Reserved.