daveg | Posts: 3

How work with multi-page document? OnPage(1)

0 votes
Hello, I'm using c# / .NET to code. I am having trouble writing signatures on pages other than page(0) of uploaded documents. In my DocumentPackage, I use the "FromStream" method and stream a multi-page (3) pages document. However, in code, when I simply write, .WithSignature(SignatureBuilder.SignatureFor(email1Signer1).OnPage(1).AtPosition(100, 450)), an error is thrown. How do I tell the eSignLive system, I working with a mutli-page document, if the ".OnPage()" method is not the correct one. Thank you, DaveG

harishaidary | Posts: 1812

Reply to: How work with multi-page document? OnPage(1)

0 votes
Hey Dave, Can you post the error you're getting?

daveg | Posts: 3

Reply to: How work with multi-page document? OnPage(1)

0 votes
Hi Haris, Thanks for getting back to me. Here is the error I am receiving: {"Could not upload document to package. Exception: The remote server returned an error: (400) Bad Request. HTTP POST on URI https://sandbox.esignlive.com/api/packages/xxxxxxx=/documents. Optional details: {\"messageKey\":\"error.validation.invalidPageLocation\",\"message\":\"Invalid position. Object placed outside of document page boundary.\",\"code\":400,\"name\":\"Validation Error\"}"}

daveg | Posts: 3

Reply to: How work with multi-page document? OnPage(1)

0 votes
Haris, Going on that error, I sent above. I am trying to access use a signature on page 2 of the Word document being uploaded here. So, I use "...OnPage(1), which then throws the error given above. For example, something simple as this throws an error and I'm not sure why... .WithDocument(DocumentBuilder.NewDocumentNamed(DOCUMENT2_NAME) .FromStream(fs2, DocumentType.WORD) .WithSignature(SignatureBuilder.InitialsFor(email1Signer1) .OnPage(1) .AtPosition(475, 640)) any suggestions how to work with multi-page documents? Also, how do you determine the size / boundaries of documents? Are there standard sizes? Thank you very much.

harishaidary | Posts: 1812

Reply to: How work with multi-page document? OnPage(1)

0 votes
You don't have to specify to eSignLive the number of pages in your document. As long as you specify the correct page, it should be fine (indexing starts at 0). So far, I don't see anything wrong in what you're doing. Can you try the following:
  1. Use another multi-page word document to see if you're getting the same error
  2. Try .AtPosition(0, 0)
Also, the default size for signature fields is 200x50 pixels. I'm not sure about the page dimensions. I'll have to look into it and get back to you. Would you also be able to share your word document so I can try on my side?

harishaidary | Posts: 1812

Reply to: How work with multi-page document? OnPage(1)

0 votes
The default page dimensions are 796x1030 pixels.

florentbillois | Posts: 1

Reply to: How work with multi-page document? OnPage(1)

0 votes
Hi, I was wondering if you are still using 796 * 1030 as the default page dimensions. If i import my test pdf in gimp, they are telling me it's 826 x 1169. If i set width to 796, it automatically switches height to 796 x 1126. And if I set Height to 1030, it automatically switches to 728*1030. I tested with 5 differents pdf. Either way none of the Signature/Fields blocks ends up at the exact same position when I upload the document ... Is there any zoom/scale applied ? Is there a way to get the document Size in Pixel before uploading it ? Do you have any tips ? Thank you. using .Net SDK 11.15.0

Duo_Liang | Posts: 3776

Reply to: How work with multi-page document? OnPage(1)

0 votes
Hi Florent, The default scale OneSpan Sign currently using is "8.5 inch * 11 inch"(what I see in Adobe PDF Reader), and when you change that scale into pixel, it's equal to "796 * 1030". So I prefer to explain this as a default "Pixel Density" OSS is using. If your PDF is with a different scale, for example "8.26 * 11.69 in", OSS will change that into "774 * 1095", still follows the original scale and equal pixel density to the case we discussed above(8.5 * 11 -> 796 * 1030). So in this case, can you please have a check on your pdf original dimension to see whether it's different from the default size? Duo

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off