-
public class DocumentDataReader
-
-
Field Summary
Fields Modifier and Type Field Description public final static DocumentDataReaderINSTANCE
-
Method Summary
Modifier and Type Method Description final static Unitinit()For internal use by the Docutain SDK only. final static BooleanloadFile(String path, String password)This method loads a file from the given path. final static BooleanloadFile(String path)This method loads a file from the given path. final static BooleanloadFile(Uri uri, String password)This method loads a file from the given Uri. final static BooleanloadFile(Uri uri)This method loads a file from the given Uri. final static BooleanloadFile(ByteArray bytes, String fileExtension, String password)This method loads a file from the given ByteArray. final static BooleanloadFile(ByteArray bytes, String fileExtension)This method loads a file from the given ByteArray. final static BooleansetAnalyzeConfiguration(AnalyzeConfiguration analyzeConfiguration)This method sets the analyze configuration. final static Stringanalyze()Analyzes the currently loaded document and returns the detected data. final static StringgetText(Integer pageNumber)Detects the text of the currently loaded document and returns it. final static StringgetText()Detects the text of the currently loaded document and returns it. -
-
Method Detail
-
loadFile
@JvmOverloads() final static Boolean loadFile(String path, String password)
This method loads a file from the given path.
Only paths in internal app directory and it's subdirectories are supported.
- Parameters:
path- the path pointing to the file to be loaded.password- the password if file is encrypted.
-
loadFile
@JvmOverloads() final static Boolean loadFile(String path)
This method loads a file from the given path.
Only paths in internal app directory and it's subdirectories are supported.
- Parameters:
path- the path pointing to the file to be loaded.
-
loadFile
@JvmOverloads() final static Boolean loadFile(Uri uri, String password)
This method loads a file from the given Uri.
- Parameters:
uri- the content Uri pointing to the file to be loaded.password- the password if file is encrypted.
-
loadFile
@JvmOverloads() final static Boolean loadFile(Uri uri)
This method loads a file from the given Uri.
- Parameters:
uri- the content Uri pointing to the file to be loaded.
-
loadFile
@JvmOverloads() final static Boolean loadFile(ByteArray bytes, String fileExtension, String password)
This method loads a file from the given ByteArray.
- Parameters:
bytes- the ByteArray of the file to be loaded.fileExtension- the extension of the file to be loaded, e.g.password- the password if file is encrypted.
-
loadFile
@JvmOverloads() final static Boolean loadFile(ByteArray bytes, String fileExtension)
This method loads a file from the given ByteArray.
- Parameters:
bytes- the ByteArray of the file to be loaded.fileExtension- the extension of the file to be loaded, e.g.
-
setAnalyzeConfiguration
final static Boolean setAnalyzeConfiguration(AnalyzeConfiguration analyzeConfiguration)
This method sets the analyze configuration.
- Parameters:
analyzeConfiguration- An instance of AnalyzeConfiguration.
-
analyze
final static String analyze()
Analyzes the currently loaded document and returns the detected data.
-
getText
@JvmOverloads() final static String getText(Integer pageNumber)
Detects the text of the currently loaded document and returns it.
- Parameters:
pageNumber- number of the page you want the text from or -1 to get text of entire document
-
getText
@JvmOverloads() final static String getText()
Detects the text of the currently loaded document and returns it.
-
-
-
-