galkahana / HummusJS

Node.js module for high performance creation, modification and parsing of PDF files and streams
http://www.pdfhummus.com
Other
1.14k stars 169 forks source link

Unable to recrypt files error #404

Closed ZoharGel closed 4 years ago

ZoharGel commented 4 years ago

My application is running on Amazon Linux/4.9.2 using Node.js version: 10.16.0 I use HummusJS 1.0.104 to encrypt and decrypt pdf files (stream).

Encryption code:

hummus.recrypt(pdfReader, pdfWriter, { userPassword: password, ownerPassword: password });

When I run a load test with the same file and the same password I sometimes get the following error on encryption:

TypeError: Unable to recrypt files, check that input and output files are clear and arguments are coool

After an internal retry the encryption succeeds. What could be the reason for this error?