chunyenHuang / hummusRecipe

A powerful PDF tool for NodeJS based on HummusJS.
https://hummus-recipe.s3.amazonaws.com/docs/Recipe.html
MIT License
339 stars 91 forks source link

Feature: Encryption is not supported in Buffer Mode yet. #233

Open vardhan1122 opened 2 years ago

vardhan1122 commented 2 years ago

this is my nodejs code, please refere once

const HummusRecipe = require('hummus-recipe'); const pdfDataFile = fs.readFileSync('./downloads/Test.pdf'); const pdfDoc = new HummusRecipe(pdfDataFile, 'protectedPdfFile.pdf'); await pdfDoc .encrypt({ userPassword: '123', ownerPassword: '123', userProtectionFlag: 4 }) .endPDF(); await doc.save('./downloads/TestPdfProtected2.pdf');