Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Rail Add Password on Uploaded PDF file  (Read 30094 times)

0 Members and 1 Guest are viewing this topic.

iampankaj

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    Rail Add Password on Uploaded PDF file
    « on: December 16, 2022, 08:06:09 AM »
    This question does not show any research effort; it is unclear or not useful

    I have a Rails application where the user can upload a PDF. The application will add a password automatically(the password will be generated using the user's data) and then will save it to AWS S3. So, when the user opens that PDF, the PDF would ask for the password. This problem is also mentioned in the Courses like Ruby Training etc.

    Right now I am able to upload the PDF without adding a password and it is working. My problem is adding a password to it automatically.

    On the same application, I also used Prawn since I have a separate feature where the system will generate the PDF(not uploaded by the user) and I can add the password to it.

    P.S. I also need to add a password if the user uploads an image file. I just want to ask if there is a way I can add a password to the uploaded image file OR if I need to convert it to PDF?

    Thanks for the help!