Account
Earned badges
Achievement: Latest Unlocked
Replies
Topics Started
Preferences
Topic Started
Replies Created
Reply to: How to convert signature coordinates from millimeter unit to OneSpan unit?
Thursday, May 25, 2023 at 09:20amReply to: How to convert signature coordinates from millimeter unit to OneSpan unit?
Thursday, May 25, 2023 at 11:08amPlease 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.
Reply to: How to convert signature coordinates from millimeter unit to OneSpan unit?
Thursday, May 25, 2023 at 11:48amPlease use the attached PDF for testing we got the issue on 3rd page
Reply to: How to convert signature coordinates from millimeter unit to OneSpan unit?
Thursday, May 25, 2023 at 12:40pmThank you so much, We will try to floor that number before sending it to OSS and I will keep you posted.
Reply to: How to convert signature coordinates from millimeter unit to OneSpan unit?
Friday, May 26, 2023 at 08:37amBTW,
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
}
]
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