Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics

How to create package with role without sending mail to signer 

 

Please send me one payload with multiple signer box also.

 

Thanks in advance.

Getting error when create package when read file from server.

Working Code: When read file from local machine

 

 var options = {

            'method': 'POST',

Please  share node js code to download signed document.

Replies Created

Reply to: How to download PDF document in node js

0 votes

Thanks Duo for your response.

 

Please let me know one thing how to download that file in node js side instead of front end.

 

And when I download from node js, that time it shows me file is encrypted , I have attached my code as well.

 

export let DownloadEsignDocument = (req: Request, res: Response, next: NextFunction) => {

    try {

        var options = {

            'method': 'GET',

            'url': 'https://sandbox.esignlive.com/api/packages/eQPdmcgAhn7djTl_-gY9cn3-i-E=/documents/6bdedd15e9c3eedf4d5b860af33a396d60ac7f709947a600/pdf',

            'headers': {

              'Authorization': 'Basic xxxxxxxxxxxxxxxxxxx',

              'Accept': 'application/pdf'

            }

          };

        request(options, function (error, response) {

            if (error) throw new Error(error);

            else {          

                const fs = require('fs');

                

                fs.writeFileSync('some1.pdf', arrByte.toString());

                fs.writeFileSync('some2.pdf', response.body);

                response.body.toString(fs.createWriteStream('some3.pdf'));

                fs.writeFile('som4.pdf', response.body);

 

                res.status(200).json({

                    "status": true,

                    "data": response.body,

                    "message": ""

                });

                

            }

        });

    }

    catch (error) {

        next(error);

    }

}

 

 


Attachments

Subscriptions

Topics Replies Freshness Views Users
1 2 years 9 months ago 136
Profile picture for user Duo_Liang

How to create package with role without sending mail to signer 

 

Please send me one payload with multiple signer box also.

 

Thanks in advance.

3 2 years 11 months ago 96
Profile picture for user Duo_Liang

Getting error when create package when read file from server.

Working Code: When read file from local machine

 

 var options = {

            'method': 'POST',

2 2 years 11 months ago 49
Profile picture for user Duo_Liang

Please  share node js code to download signed document.

9 2 years 11 months ago 4,020
Profile picture for user Duo_Liang

Hi,

in our IT-system(SAP) we have the PDFs, that  we want to send to OneSpan, stored in a table in binary format.

7 2 years 11 months ago 6,229
Profile picture for user Duo_Liang

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.