This topic contains 7 replies, has 4 voices, and was last updated by  Duo_Liang 4 months, 2 weeks ago.

  • Author
    Posts
  • Participant
    daveg
    Newbie
    Member since: 18.04.2016
    Number of posts: 3

    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

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    Hey Dave,

    Can you post the error you’re getting?


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    daveg
    Newbie
    Member since: 18.04.2016
    Number of posts: 3

    Score

    0

    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\”}”}

    Participant
    daveg
    Newbie
    Member since: 18.04.2016
    Number of posts: 3

    Score

    0

    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.

    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    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 200×50 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?


    Haris Haidary
    OneSpan Technical Consultant
    • This reply was modified 2 years, 8 months ago by  Haris.
    • This reply was modified 2 years, 8 months ago by  Haris.
    Keymaster
    Haris
    Jedi Master
    Member since: 05.11.2015
    Number of posts: 1450

    Score

    0

    The default page dimensions are 796×1030 pixels.


    Haris Haidary
    OneSpan Technical Consultant
    Participant
    florentbillois
    Newbie
    Member since: 02.08.2018
    Number of posts: 1

    Score

    0

    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

    Keymaster
    Duo_Liang
    Guru
    Member since: 14.06.2018
    Number of posts: 608

    Score

    0

    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


    Duo Liang
    OneSpan Junior Technical Evangelist
    • This reply was modified 4 months, 2 weeks ago by  Duo_Liang.

You must be logged in to reply to this topic.