docusignapi

How to disable the print button for in docusign, for a signer or for the envelope?


I'm using the API to create an Envelope and to request a signature through my app. When a signer displays the document, there is a button to print the document.

I'd like to request the API to disable the button for some signers or if not possible for all the signers of the Envelope.

I found this answer : How to disable and hide the print and separate and combined pdf download option for docusign signer, where it seems possible by modifying the resources of the account. I haven't try yet because it is not exactly what I want.

I expect something in the API to set this property for the envelope or for the recipient.


Solution

  • One other way you can do this is using a feature called Focused View. This feature improved the embedding experience for developers such that you actually use a DIV element in your page and the UI that renders in there looks like a component and has fewer controls and menus etc.

    You can find the code example in this article - https://developers.docusign.com/docs/esign-rest-api/how-to/request-signature-focused-view/

    Here is the HTML and JavaScript needed to render:

    <br />
    <h2>The document has been embedded with focused view.</h2>
    <br />
    
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset=\"utf-8\" />
        <title>Signing</title>
        <style>
            html,
            body {
                padding: 0;
                margin: 0;
                font: 13px Helvetica, Arial, sans-serif;
            }
    
            .docusign-agreement {
                width: 75%;
                height: 800px;
            }
        </style>
    </head>
    <body>
        <div class=\"docusign-agreement\" id=\"agreement\"></div>
    </body>
    </html>
    
    <p><a>Continue</a></p>
    
    <script>
        window.DocuSign.loadDocuSign('" . $integrationKey . "')
            .then((docusign) => {
                const signing = docusign.signing({
                    url: '" . $url . "',
                    displayFormat: 'focused',
                    style: {
                        /** High-level variables that mirror our existing branding APIs. Reusing the branding name here for familiarity. */
                        branding: {
                            primaryButton: {
                                /** Background color of primary button */
                                backgroundColor: '#333',
                                /** Text color of primary button */
                                color: '#fff',
                            }
                        },
                    
                        /** High-level components we allow specific overrides for */
                        signingNavigationButton: {
                            finishText: 'You have finished the document! Hooray!',
                            position: 'bottom-center'
                        }
                    }
                });
            
                signing.on('ready', (event) => {
                    console.log('UI is rendered');
                });
            
                signing.on('sessionEnd', (event) => {
                    /** The event here denotes what caused the sessionEnd to trigger, such as signing_complete, ttl_expired etc../ **/
                    console.log('sessionend', event);
                    window.close();
                });
            
                signing.mount('#agreement');
            })
            .catch((ex) => {
                // Any configuration or API limits will be caught here
            });
    </script>
    

    Here is what it looks like:

    enter image description here