콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
9054 화면

I was trying to generate a pdf using  rml report. I want to secure it using a password. How can I do that in Odoo 8.0 ?

아바타
취소
베스트 답변

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))


아바타
취소
베스트 답변

There are various solutions available to apply the password to your PDF file. I checked many solutions and come with an amazing tool named Softaken PDF Protector Tool which simply lock your PDF file and restrict others to open it without knowing the password. 

아바타
취소
베스트 답변

Hi,

This app will also helpful: https://apps.odoo.com/apps/modules/13.0/password_protected_pdf/

아바타
취소
관련 게시물 답글 화면 활동
0
4월 18
4212
2
3월 15
9279
5
6월 18
17125
0
9월 15
4277
3
7월 24
8909