page_idx option

The following values can be assigned to the variable page_idx when processing documents:

  • page_idx: 0 is assigned for the front side of the document (image with photo)
  • page_idx: 1 is assigned to the back side of the document (image without photo)

This parameter is automatically assigned after the document type is recognized. Therefore, you cannot assign this value manually.

Let's look at an example where the front and back sides of a document are originally assigned incorrectly.


{
    "processParam": {
        "scenario": "FullProcess"
    },
    "List": [{
        "format": ".jpg",
        "light": 6,
 "page_idx": 0,
        "ImageData": {
           "backside" //value 0 is mistakenly assigned to the back side of the document
        }
  }, {
        "format": ".jpg",
        "light": 6,
 "page_idx": 1,
        "ImageData": {
           "frontside" //value 1 is mistakenly assigned to the front side of the document
        }
    }]
},

The following information will be received as a response:


"lightIndex": 0, 
 "originalPageIndex": 1,
 "pageIndex": 0, // 0 assidnet to the front side insted of 1
....
},
 "lightIndex": 0,
 "originalPageIndex": 1, //the value for this variable has not changed and remains as it was set by the user in the query above
 "pageIndex": 0,
.... 
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.

Articles in this section