saveChanges method throw error when used with multiple image
Posted: Thu Dec 28, 2023 2:03 pm
Hello ,
I have open multiple images in web document viewer using array below is the sample code
After that we have deleted 0.jpg and save that changes using below code
The above code sent .Net core API request "MyVintasoftFileApi/SaveImageFile" to save the changes , below is the request
But it in response we are getting error of "Single-page encoder cannot be used because collection contains more than one image" , below is the response
Can you please share how can we resolve this error
Thanks
Jwalit Katira
I have open multiple images in web document viewer using array below is the sample code
Code: Select all
let images = [
"0.jpg",
"1.jpg",
"2.jpg",
];
imageViewer.get_Images().openFiles(images);
Code: Select all
let index = docViewer.getFocusedIndex();
docViewer.removePage(index);
docViewer.saveChanges();
Code: Select all
{
"fileId": "0.jpg",
"createNewFile": false,
"imageInfos": [
{
"fileInfo": {
"id": "1.jpg"
},
"pageIndex": 0
},
{
"fileInfo": {
"id": "2.jpg"
},
"pageIndex": 0
}
],
"sessionId": "SessionID"
}
Code: Select all
{
"fileId": "0.jpg",
"success": false,
"blocked": false,
"errorMessage": "Single-page encoder cannot be used because collection contains more than one image.\r\n",
"requestId": null
}
Thanks
Jwalit Katira