Esign Coordinates Query
Thursday, May 2, 2019 at 02:04am
We are Generating the documents from another vendor WK(Wolters Kluwer) and passing it to onespan Esign.But we are facing issue while mapping the X/Y coordinates.
Because top/left fields of e-sign are calculated from top left of the page and Wolters Kluwer works like x/y coordinates start at the bottom/left.
Please share the field name of Esign through which we can map the x/y coordinate or bottom/left coordinate of Wolters Kluwer(Wk) with Esign.
Reply to: Esign Coordinates Query
Thursday, May 2, 2019 at 10:21amReply to: Esign Coordinates Query
Thursday, January 21, 2021 at 08:42amGood morning! I was referred to this post by a rep in the CSM portal, and had a follow up question regarding this. We're currently working on transitioning from one vendor to OneSpan, and are running into the same situation as the original poster. Our current vendor has supplied that PDF images displayed to the signer are converted by Qoppa with the resolution of 120 DPI. How does this 120 DPI relate with the resolution you supplied in your post above (796x1030)? I'm currently having a hard time finding a relationship between this so we can more easily convert our coordinates for OneSpan. Any guidance on this would be greatly appreciated!
Reply to: Esign Coordinates Query
Friday, January 22, 2021 at 09:24amHi Anthony,
Thanks for the post!
In OneSpan Sign, the Doc Engine converts 8.5inch * 11inch PDF to 796px * 1030px, so I believe the default resolution is:
8.5inches * 93.6dpi = 796px
11inches * 93.6dpi = 1030px
I am not an expert in PDF, but I think the Doc Engine will scanned the document with around 93.6 dpi, no matter the quality of your PDF.
So you just need to figure out how this 120DPI effects your PDF page size, is it still 8.5inch * 11inch, or resizes the page accordingly?
Duo
Reply to: Hi Anthony, Thanks for…
Monday, January 25, 2021 at 11:01amHi Duo!
Thank you for your reply, really appreciate it. So I confirmed with our vendor that they do not resize the page, so the resolution is 1020 x 1320. Do you by chance have a suggestion on an easy way to convert these Y/X coordinates given this information?
OneSpan:
Origin - top left
Resolution - 796 x 1030px
Current Vendor:
Origin - bottom left
Resolution - 1020 x 1320
Reply to: Hi Duo! Thank you for your…
Monday, January 25, 2021 at 11:18amI see, if your vendor didn't resize the PDF, so it's still 8.5inch * 11inch:
8.5inch * 120dpi = 1020px
11innch * 120dpi = 1320px
Based on this size (8.5inch * 11inch), OneSpan Sign will convert it to default resolution 796 * 1030px (with 93.6 dpi) - on other word, if your page size is not 8.5*11, OSS will convert it to a different resolution accordingly
As a result, in OneSpan Sign Axis, your top left corner is (0,0) and bottom left corner is (0, 1030) - refer to the coordinate axis I drawed in this guide
If this still confuses you, could you provide an example with:
1. a dummy PDF created by your vendor
2. the original coordinates of a PDF form (or a text) in your vendor
I will provide a formula for transformation based on above information.
Duo
Reply to: I see, if your vendor didn't…
Monday, January 25, 2021 at 02:07pmThank you so much Duo. A formula for transformation would be greatly helpful and help our team with the transition to OneSpan. Attached is a PDF, and below is a signature block along with some form fields we used for the old vendor we're moving away from. This data currently shows in the "(Signature of Co-Owner "Grantor,” if applicable)" section on page 3 of the PDF.
{
"signerEmail": "[email protected]",
"actionType":"EditSign",
"XCoordinate": 80.0,
"YCoordinate": 310.0,
"height": 25.0,
"width": 190.0,
"pageNumber": 3,
"signatureStyle": "LIVESIGN",
"fields": [
{
"fieldType": "TEXTFIELD",
"xCoordinate": 85.00,
"yCoordinate": 288.00,
"width": 170.00,
"height": 15.00,
"pageNumber": 3,
"fieldIdentifier": "0001",
"fieldFieldDescription": "License",
"fieldDefaultValue": "AB123456"
},
{
"fieldType": "TEXTFIELD",
"xCoordinate": 75.00,
"yCoordinate": 258.00,
"width": 200.00,
"height": 15.00,
"pageNumber": 3,
"fieldIdentifier": "0002",
"fieldFieldDescription": "Address",
"fieldDefaultValue": "123 Smith Rd"
},
{
"fieldType": "TEXTFIELD",
"xCoordinate": 295.00,
"yCoordinate": 258.00,
"width": 100.00,
"height": 15.00,
"pageNumber": 3,
"fieldIdentifier": "0003",
"fieldFieldDescription": "City",
"fieldDefaultValue": "xx"
},
{
"fieldType": "TEXTFIELD",
"xCoordinate": 400.00,
"yCoordinate": 258.00,
"width": 50.00,
"height": 15.00,
"pageNumber": 3,
"fieldIdentifier": "0004",
"fieldFieldDescription": "State",
"fieldDefaultValue": "OH"
}]
}
Reply to: Thank you so much Duo. A…
Tuesday, January 26, 2021 at 10:11amThanks for the sharing! Two questions:
(1)Did the actual layout look similar to below? - with the signature field lower than the underscore?
(2)Is it possible that in your previous vendor, to create a field with whole page large and get the page size? With this information, the formula should be:
int factor = 796 / {previous_page_width} this should equal to 1030 / {previous_page_height}
int width = factor * {previous_width}
int height = factor * {previous_height}
int x = factor * {previous_x_coordinate}
int y = factor * ({previous_page_height} - {previous_height} - {previous_y_coordinate})
Duo
Reply to: Esign Coordinates Query
Tuesday, January 26, 2021 at 10:49amHi Duo,
So the layout was very close to that, but no, the signature block was not below the underscore.
For your second question, are asking to create a field or signature block that would cover the entire page with the old vendor?
Thank you,
Anthony
Reply to: Hi Duo, So the layout was…
Tuesday, January 26, 2021 at 01:16pmYes, that's what I meant. According to the formula, to know the entire page size in your old vendor is essential for the conversion. (It's not very likely to be 1020 x 1320 as provided above)
Duo
Reply to: Esign Coordinates Query
Tuesday, January 26, 2021 at 01:53pmOk, let me get a request together and I'll provide that field block for you. Stay tuned!
Reply to: Esign Coordinates Query
Wednesday, January 27, 2021 at 07:57amGood morning Duo!
Ok, took some trial and error, but I was able to create a field that took up the whole page on page 3 of the PDF I shared with you previously. Please see below for the details.
{
"fieldType": "TEXTFIELD",
"xCoordinate": 0.00,
"yCoordinate": 0.00,
"width": 615.00,
"height": 795.00,
"pageNumber": 3,
"fieldIdentifier": "0001",
"fieldFieldDescription": "License",
"fieldDefaultValue": "AB123456"
}
Look forward to hearing back, and thank you again for all this help.
Thank you,
Anthony
Reply to: Esign Coordinates Query
Wednesday, January 27, 2021 at 08:06amAttached is also an image of the field taking up the whole page for reference.
Reply to: Esign Coordinates Query
Wednesday, January 27, 2021 at 09:10amThanks Anthony! From the data you provided, it's very likely the resolution used in your previous vendor is 72.3dpi:
8.5inch * 72.3dpi = 614.55px ≈ 615px
11inch * 72.3dpi = 795.3px ≈ 795px
Based on this assumption, below is the formula in Java:
public class Coordinates {
double x;
double y;
double width;
double height;
public Coordinates(double preX, double preY, double preWidth, double preHeight) {
final double factor = 93.6 / 72.3;
this.width = roundup2digits(factor * preWidth);
this.height = roundup2digits(factor * preHeight);
this.x = roundup2digits(factor * preX);
this.y = roundup2digits(factor * (795 - preHeight - preY));
}
private double roundup2digits(double a) {
return Math.round(a * 100.0) / 100.0;
}
}
I also attached the sample code I used to test with your sample PDF.
Duo
Reply to: Esign Coordinates Query
Wednesday, January 27, 2021 at 01:41pmDuo, thank you so much for this and all your help. I will test this formula in our code on a few different templates, and follow up if I have any questions. Thank you again! Really appreciate it!
-Anthony
Reply to: Esign Coordinates Query
Friday, February 12, 2021 at 09:10amHi Duo,
Following up on this because we have another client who is switching from the same vendor as I mentioned in my posts before to OneSpan. The formula you supplied originally worked very well for our first client, but seems to not be working for our second client. Was curious if you might be able to assist on this as well? Below is the signature we're using for this PDF. I've also provided the PDF being used, along with a screenshot of where the signature should be placed. I did the same step of creating a field that took up the whole page, and it looks like the size comes to 615W x 830H. Any chance you'd be able to assist with this?
"signatures": [
{
"signerEmail": "[email protected]",
"actionType":"EditSign",
"XCoordinate": 41.0,
"YCoordinate": 461.826,
"height": 20.0,
"width": 160.0,
"pageNumber": 1
}
]
Reply to: Hi Duo, Following up on this…
Friday, February 12, 2021 at 10:29amHi Anthony,
This is because this PDF is 8,5*11.5inch (0.5inches taller than the normal A4), and as per our formula, it's inevitable to use the original page height (795px by default) and minus the Y coordinate and the field height. Based on that, I would suggest to add an additional parameter "page height in inch" (default value is11inch), and calculated the original page height instead of using fixed 795px:
public class Coordinates {
double x;
double y;
double width;
double height;
public Coordinates(double preX, double preY, double preWidth, double preHeight, double pageHeightInInch) {
final double factor = 93.6 / 72.3;
this.width = roundup2digits(factor * preWidth);
this.height = roundup2digits(factor * preHeight);
this.x = roundup2digits(factor * preX);
this.y = roundup2digits(factor * (Math.floor(pageHeightInInch * 72.3) - preHeight - preY));
}
private double roundup2digits(double a) {
return Math.round(a * 100.0) / 100.0;
}
}
Duo