What it does
Adds a new document from an image file into a batch. To create a document without an image, leave the file parameter empty (file.Name = "", file.Bytes = new bytes [0]). A new document is created with the excludeFromAutomaticAssembling flag set to true. This flag indicates that the document has already been assembled, and the assembly settings specified for the batch type will not be applied to this document.When a new document is added into the batch, the Id field of the corresponding object must not be empty.
Definition
Parameters
Name | Type | Description |
sessionId | int | The ID of the connection to the Application Server |
document | A description of the document that is being created | |
file | The file that contains the document image | |
excludeFromAutomaticAssembling | bool | A flag that shows whether the document is excluded from document assembly or not:
|
previousItemId | int | The ID explicitly specifying the position of the new document in the set:
|
You can also use a POST request to add document image. For this, create a document with an empty file by this method (file.Name = “FileName”, file.Bytes = new bytes [0]). Then execute a POST request with the following parameters:
- Action = Save
- objectType = 0
- objectId = documentId, where documentId document ID returned by the AddNewDocument method
- version = 0
- streamName = “C:\Temp\image.pdf”, where image.pdf is a name of the file specified when calling the AddNewDocument method
Returned value
| Type | Description |
|---|---|
| int | The ID of the created document |
