Search code examples
c#.netdocusignapidigital-signature

DocuSign Document loses styles when I use SignHereTabs using C# DocuSign SDK


I am using DocuSign SDK for sending html documents for signing, when I send the document without specifying the position to sign, it works fine, all the css styles are applied and the document looks exactly as I wanted. but when I use the SignHere Tab to specify exactly where the signer should sign(see code), the document loses all it's styles and becomes one long document with only texts aligned left (even html tables are lost).

        SignHere signHere = new SignHere
        {
            DocumentId = "1",
            AnchorString = "Signature obligatoire",
            AnchorXOffset = "3",
            AnchorYOffset = "10",
            AnchorUnits = "pixels"
        };

        envelopeDefinition.Recipients = new Recipients
        {
            Signers = new List<Signer>()
            {
                new Signer
                {
                    Email = "[email protected]",
                    Name = "test",
                    RecipientId = "1",
                    RoutingOrder = "1",
                    Tabs = new Tabs
                    {
                        SignHereTabs = new List<SignHere> { signHere },
                    }
                }
            }
        };

I tried disabling/enabling responsive signing, but it didn't work.

Edit : also when I access the document from my account in docusign, the document looks fine

desired document

but when I want to sign it, it loses its styles:

result when I want to sign


Solution

  • After days of debugging and testing different approaches, I concluded that when I try to specify the position of the signature using SignHere tabs from C# code or the "ds-signature" tag in the HTML template, DocuSign somehow makes the document responsive and the the styles are lost. However, when I used inline css it worked, the document still responsive, but at least the styles are not lost and the position of the signature is successfully spicified.

    I guess DocuSign supports only inline css when using responsive signing.