Odoo Aide

0

1
1 Answer
0
Avatar

Kamlesh Vadhiya

--Kamlesh Vadhiya--

7232
| 5 2 5
Vadodara, Inde
--Kamlesh Vadhiya--

Odoo Consultant | Full Stack Odoo Developer | Odoo Expert Feel free to connect: kamlesh230992@gmail.com LinkedIn: https://www.linkedin.com/in/vadhiyakamlesh/ FB:https://www.facebook.com/ahir.kamlesh.vadhiya Always Happy to help :)

Kamlesh Vadhiya
13/06/2018 02:28

you have to encrypt the pdf file using code
i hope this code will help you .


import sys

from pyPdf import PdfFileWriter, PdfFileReader

 

 def secure_pdf(InPdf, OutPassPdf, Passwd):

     output = PdfFileWriter()

     input1 = PdfFileReader(file(InPdf, "rb"))

     for i in range(0, input1.getNumPages()):

         output.addPage(input1.getPage(i))

     outputStream = file(OutPassPdf, "wb")

     output.encrypt(Passwd, use_128bit=True)

     output._header

     output.write(outputStream)

     outputStream.close()

     return True

     

secure_pdf("/Input.pdf",

           "/OutPut.pdf",

           str(email_id))


Poser une question
Étiquettes
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now