node-qpdf icon indicating copy to clipboard operation
node-qpdf copied to clipboard

Password Protection Encrypt and Decrypt is not working

Open karthiktanj opened this issue 4 years ago • 7 comments

When we are trying to make password protection below error is occuring. Could you please provide the solution to encrypt and decrypt the pdf with password protection

Error :spawn qpdf ENOENT

TypeScript Code : var qpdf = require('node-qpdf'); var file = path.join(__dirname, 'sample.pdf');

            const options = {
                keyLength: 128,
                password: 'test1234'
            }
            qpdf.encrypt(file, options);
          
           

karthiktanj avatar Oct 05 '20 10:10 karthiktanj

Same here!

michchan avatar Nov 17 '20 06:11 michchan

Did you install qpdf on your OS?

LaKing avatar Nov 26 '20 19:11 LaKing

Yes Installed and working. Thanks and Regards KARTHIK.M

On Friday, 27 November, 2020, 01:21:34 am IST, István Király <[email protected]> wrote:  

Did you install qpdf on your OS?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

karthiktanj avatar Nov 27 '20 14:11 karthiktanj

I am receiving the same error as well, when trying to decrypt a pdf!

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn qpdf ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

arladmin avatar Dec 22 '20 06:12 arladmin

Ye kya bawaseer bana diye ho? maarte hai kasai mohalla jata hai calcutta!! Screenshot (1)

shashanksaxena avatar Jan 23 '21 22:01 shashanksaxena

Did you install qpdf on your OS?

Btw that solved mine. Thanks!

michchan avatar Mar 23 '21 14:03 michchan

I have the same issue on Win 10. qpdf installed and available in the terminal:

image

ljadrbln avatar May 12 '23 17:05 ljadrbln