Closed michaelktree closed 5 years ago
So I read this: https://github.com/galkahana/HummusJS/issues/216 According to that my only option is to make two passes:
Hi @galkahana, Any solution or insight for this would be great. Thanks!
Well, I'm still not sure why I could not achieve this via Hummus, However I found out that this works when trying it with HummusRecipe (which relies on Hummus)
Hi, My scenario is, I have pdf templates that I modify according to user inputs. The template pdf files are not encrypted, but I want to return a locked file that cannot be updated after inserting user data (but I don't want to lock the file with a password). I am using this command to create a new file, and add to it some fields:
: : : await pdfWriter.writePage(page); await pdfWriter.end();
Everything seems to work fine, however the output pdf is not encrypted...
I tried another route to achieve this using "recrypt" function, but that has its own issue: When using it on an 'existing' file it works fine. but when using it in the same process, on the output of the createWriterToModify above, I get an exception: "Unable to recrypt files, check that input and output files are clear and arguments are coool"
Any help would be appreciated. Thanks, Michael