createDocument

Task<DocumentcreateDocument(@NonNull() Array<byte> document, @Nullable() String filename, @Nullable() DocumentTaskManager.DocumentType documentType)

Uploads raw data and creates a new Gini document.

Return

A Task which will resolve to the Document instance of the freshly created document. Important: If using the default Gini API, then use createPartialDocument to upload the document and then call createCompositeDocument (or createCompositeDocument) to finish document creation. The returned composite document can be used to poll the processing state, to retrieve extractions and to send feedback.

Parameters

document

A byte array representing an image, a pdf or UTF-8 encoded text

filename

Optional the filename of the given document.

documentType

Optional a document type hint. See the documentation for the document type hints for possible values.

Task<DocumentcreateDocument(@NonNull() Array<byte> document, @Nullable() String filename, @Nullable() DocumentTaskManager.DocumentType documentType, @NonNull() DocumentMetadata documentMetadata)

Uploads raw data and creates a new Gini document.

Return

A Task which will resolve to the Document instance of the freshly created document. Important: If using the default Gini API, then use createPartialDocument to upload the document and then call createCompositeDocument (or createCompositeDocument) to finish document creation. The returned composite document can be used to poll the processing state, to retrieve extractions and to send feedback.

Parameters

document

A byte array representing an image, a pdf or UTF-8 encoded text

filename

Optional the filename of the given document.

documentType

Optional a document type hint. See the documentation for the document type hints for possible values.

documentMetadata

Additional information related to the document (e.g. the branch id to which the client app belongs)