feat(pdf-unlock): add password input for decryption#326
Conversation
Add password input field to PDF unlock tool to properly decrypt password-protected PDFs using qpdf's --password parameter. Changes: - Added password ref and input field to pdf-unlock.vue - Split file upload and processing into separate steps - Updated qpdf command to include --password parameter - Added translations for all 19 supported languages: - label-password - placeholder-password - tag-decrypt-pdf - tag-output-file
|
Hi @DennisGaida the intent of this tool was to unlock pdf flags of non password protected. But right to add password decryption. The only problem I see is that current implementation allows decrypting in bulk just by dropping pdfs. It may be interesting to keep this behavior |
|
Gotcha, so PDFs that are simply security locked without password. I still needed a quick way to remove a simple unnecessary password from a document, so maybe I could make the password field optional? Is it even optional, I didn't try the non-password case. |
|
Hi @DennisGaida , the best solution would probably be to add an optional password field and let processing file on upload (not with a button), may not be the best UI |
|
Deployment failed with the following error: |
Alright made the password field optional with a checkmark to activate the field. Without the password set, files are decrypted without using a password. With the checkmark set the password is used to decrypt. |
|
@DennisGaida , the only problem I see with Process button is that it brokes dropping multiple files at once (this is my use case). May be just let processing done on file upload as upload calls handler for each file, process and download result just by dropping |
|
Easy fix 😉 I just reset the password field on each load, meaning the old functionality of dropping multiple files still works. This doesn't work if you actually want to remove decryption with a set password from multiple files, but this is not your use case. |
|
But this wont work because of Process button. Only one file will be processed . Password field is first then dropping pdf and then result downloads. No need to have a Process button |
|
Now I get your point about the button. Ok, automatically process whatever you upload/drag and drop without a password. Secondly you can enter a password and retry the processing with a password. |
|
Hi @DennisGaida, thanks, it is now merged |
The current pdf decrypt doesn't work at all and is using a wrong tool call. To actually decrypt we would need the previous password.
This PR adds a password input field to PDF unlock tool to properly decrypt password-protected PDFs using qpdf's --password parameter.
Changes: