[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.


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


def hello(c):

c.drawString(100,100,"Frase di test che non dovrebbe essere


c = canvas.Canvas("test.pdf",encrypt=enc)




I'm wrong using this feature or it is not entirely implemented?



reportlab-users mailing list

reportlab-users at reportlab.com


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