twain-direct icon indicating copy to clipboard operation
twain-direct copied to clipboard

Long document mode

Open petrjac opened this issue 3 years ago • 1 comments

Please, how I can set long document mode for receipts?

I was trying sending with Alaris S2070:

...
{
   "attribute":"cropping",
   "values":[
      {
         "exception":"fail",
         "value":"long"
      }
   ]
},
...

But this returns error:

{
  "kind": "twainlocalscanner",
  "commandId": "bbcc76c2-998f-4426-8e00-d0fd213199c5",
  "method": "sendTask",
  "results": {
    "success": false,
    "code": "invalidJson",
    "characterOffset": 60
  }
}

petrjac avatar Mar 22 '21 17:03 petrjac

Oddly enough TWAIN doesn't have a standard way to specify long documents (or relative cropping, for that matter). There's a placeholder in the Bridge in case that's ever added. What you should probably do is contact the scanner vendor to see if they have any plans to support TWAIN Direct in their TWAIN driver. Then you'd have access to all of the features of the scanner, instead of depending on what the Bridge is capable of parsing.

I'm going to leave this open as a reminder that it would be nice to update TWAIN to support this...

mlmcl62 avatar Mar 24 '21 14:03 mlmcl62