[reportlab-users] Encryption in pdf
richard at ootbcomputers.com
richard at ootbcomputers.com
Fri Sep 11 10:55:04 EDT 2009
It is much better to validate if a user can download the pdf than to encrypt it. Encryption can easily be defeated. Convert to .ps then convert back to pdf works every time.
--
Richard
Andrea Cappelli wrote:
Hi list,
yesterday I tried to create an encrypted pdf, as stated in paragraph 4
of readme.pdf, but it doesn't work me regarding the options like
canPrint, canCopy, etc.
The output is encrypted and requires a password to be opened (unless i
specifies only the ownerPassword, in this case as stated no password for
opening is required) but I can print and copy from the document
I'm usign reportlab 2.3 on Ubuntu 9.04 (python 2.6 ) and the following
piece of code:
from reportlab.pdfgen import canvas
from reportlab.lib import pdfencrypt
enc=pdfencrypt.StandardEncryption("","owner_pass",canPrint=0,canCopy=0)
def hello(c):
c.drawString(100,100,"Frase di test che non dovrebbe essere
copiata")
c = canvas.Canvas("test.pdf",encrypt=enc)
hello(c)
c.showPage()
c.save()
I'm wrong using this feature or it is not entirely implemented?
Thanks
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20090911/6717abd7/attachment.html>
More information about the reportlab-users
mailing list