AddNewPage
What it does
Adds a page image to a document.
Important !The added images will become accessible only after they are pre-processed. Use the ProcessBatch method to initiate batch processing after you have added the images. Another option is to use the CloseTask method to close the task and to send it at the Import stage if the images were added into the documents of a task that was opened with the OpenTask method.
Definition
int AddNewPage( int sessionId, int batchId, int documentId, int previousItemId, Page page, File file );
Parameters
Name | Type | Description |
sessionId | int | The ID of the connection to the Application Server |
batchId | int | The ID of the batch that contains the document |
documentId | int | The ID of the document into which a page is to be added |
previousItemId | int |
The ID allowing explicit specification of the position of the new page in the set:
|
page | Page | A description of the page. It is recommended to add pages with a predefined ID field |
file | File | The file that contains the page image |
Remarque : You can also use a POST request to add a new page from the file containing an image. To do this, create a page with an empty file using this method: (file.Name = "FileName", file.Bytes = new bytes [0]). Next, execute a POST request with the following parameters:
- Action = Save
- objectType = 1
- objectId = documentId, where documentId represents the ID of the document, to which a page should be added
- version = 0
- streamName = "Page 1", where 1 represents the page ID returned by the AddNewPage method
Returned value
Type | Description |
int | The ID of the added page |
12.04.2024 18:16:03