[Feature Request]: detect if PDF has password before sending it to function, auto send it to remove-password first
Feature Description
detect if PDF has password before sending it to function, auto send it to remove-password first
Why is this feature valuable?
No response
Suggested Implementation
No response
Additional Information
No response
No Duplicate of the Feature
- [X] I have verified that there are no existing features requests similar to my request.
@Frooodle is this check require for any specific module or all pdf input module
All pdf inputs Ideally we can put this logic within the request handler (downloader.js) and have it check each request file if it's pdf then detect etc
Hi @Frooodle I would like to work on it. Also can you give little more information on what exactly needs to be done.
Within the downloader.js which handles all server side requests we should detect if the request file is PDF If it is, check if its encrypted with pdf.js or pdf-lib.js, If encrypted have a prompt pop up informing user password is encrypted and to work with this feature they need to decrypt it first, do they wish to enter pdf password to automatically decrypt first? On entering it will send PDF to remove-password endpoint (I don't think any JS library that does PDF dedyption exists so lets use server side), remove it, grab that blob and then use it in original method that user intended
ok, understood. Please Assign it to me.
@dk-talks any update on this?
@dk-talks Due to lack of response, im assigning someone else to this
https://github.com/Stirling-Tools/Stirling-PDF/compare/main...decrypt Work has been done on this previously, its missing translations, testing and possibly minor usecases Maybe a better prompt instead of a 'alert' as well?
Code must
- Check if encrypted: a) Check if it needs password if so prompt and sent to remove b) Check if doesn't need password but is encrypted, if so auto decrypt