Skip to content

feat(pdf-unlock): add password input for decryption#326

Merged
sharevb merged 5 commits intosharevb:chore/all-my-stuffsfrom
DennisGaida:feat/pdf-unlock-password-input
Mar 7, 2026
Merged

feat(pdf-unlock): add password input for decryption#326
sharevb merged 5 commits intosharevb:chore/all-my-stuffsfrom
DennisGaida:feat/pdf-unlock-password-input

Conversation

@DennisGaida
Copy link

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:

  • 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

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
@sharevb
Copy link
Owner

sharevb commented Mar 2, 2026

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

@DennisGaida
Copy link
Author

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.

@sharevb
Copy link
Owner

sharevb commented Mar 3, 2026

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

@vercel
Copy link

vercel bot commented Mar 4, 2026

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@DennisGaida
Copy link
Author

the best solution would probably be to add an optional password field

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.

@sharevb
Copy link
Owner

sharevb commented Mar 4, 2026

@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

@DennisGaida
Copy link
Author

DennisGaida commented Mar 4, 2026

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.

@sharevb
Copy link
Owner

sharevb commented Mar 4, 2026

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

@DennisGaida
Copy link
Author

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.

@sharevb sharevb merged commit 8330f99 into sharevb:chore/all-my-stuffs Mar 7, 2026
4 of 7 checks passed
@sharevb
Copy link
Owner

sharevb commented Mar 7, 2026

Hi @DennisGaida, thanks, it is now merged

@DennisGaida DennisGaida deleted the feat/pdf-unlock-password-input branch March 7, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants