Account


Earned badges

Achievement: Latest Unlocked

Topic Started

This user has not created any forum posts.

Replies Created

0 votes

Hi Duo Lang,

We have applied the fix to use (1/25.4 * 93.6) = 3.685 (round to 4 decimal) but the issue is still happening, I think it is because of the page is long and we place the signature close to bottom edges, it would introduce more gap on this conversion. floor this (1/25.4 * 93.6) would resolve the issue but we will have big gap on my signature placement tool vs. actual signature appear on OneSpan signing document. I wonder if OneSpan has any API that can tell us the height of the document beforehand? that way we can validate my signature coordinates and adjust it before submit to OneSpan.

Thanks,

Vang Nguyen


0 votes

Please help to run below test

my system signature coordinates:

height: 14.877061040024874
width: 44.631183120074624
left: 165.44798354659204
top: 282.16182784886405

document size:
height: 297.0388888888889
width: 210.07916666666668

 

document size in OneSpan

{
  "id": "",
  "left": 0.0,
  "width": 774.0,
  "height": 1093.0,
  "top": 0.0,
  "version": 0,
  "index": 2
}

 

with the pixelDensity=3.685

my conversion would be

top: 282.16182784886405 x 3.685 = 1039.766335623064

height of signature: 14.877061040024874 x 3.685 = 54.82196993249166

top + height = 1094.58830555555566 so it is like 1.58px off the page.

 


0 votes

BTW,

We are trying to mimic the OneSpan page size calculation but the result is just one pixel different. I am trying figure out the rounding in OneSpan

This the formula that we use

pixel = Math.round((points * 93.6) / 72);

My result:

Page Sizes:

Page 0 - Width: 796, Height: 1030

Page 1 - Width: 796, Height: 1030

Page 2 - Width: 774, Height: 1094 // This third page is one pixel different to OneSpan result

One Span result

"pages": [
  {
    "id": "",
    "left": 0.0,
    "width": 796.0,
    "height": 1030.0,
    "top": 0.0,
    "index": 0,
    "version": 0
  },
  {
    "id": "",
    "left": 0.0,
    "width": 796.0,
    "height": 1030.0,
    "top": 0.0,
    "index": 1,
    "version": 0
  },
  {
    "id": "",
    "left": 0.0,
    "width": 774.0,
    "height": 1093.0, // The different is on this page
    "top": 0.0,
    "index": 2,
    "version": 0
  }
]

 


Attachments

Subscriptions

This user is not subscribed to any release notes.

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.