Jump to content
Changes to the Jaspersoft community edition download ×

pdf permission


so007

Recommended Posts

Hello,

 

I'm using jasperreports for generate pdf files and I want to secure them.

I try this code :

Code:

pdfExporter.setParameter(JRPdfExporterParameter.IS_ENCRYPTED, Boolean.TRUE);
pdfExporter.setParameter(JRPdfExporterParameter.IS_128_BIT_KEY, Boolean.TRUE);
pdfExporter.setParameter(JRPdfExporterParameter.USER_PASSWORD, null);
pdfExporter.setParameter(JRPdfExporterParameter.OWNER_PASSWORD, "reports"«»);
pdfExporter.setParameter(JRPdfExporterParameter.PERMISSIONS,
new Integer(PdfWriter.AllowPrinting)
);

 

But I want to assign differents permissions for user and owner. The user can only view and print the file and the owner can modify it, and I don't know when and how the owner gives it password.

 

If someone can help me ...

 

Regards,

So

Post edited by: so007, at: 2007/12/07 13:22

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

You can get more details about PDF encryption if you ask the iText community. In the JR exporter to PDF we simply rely on what iText offers for encryption and delegate all to it.

If what you want is possible with iText, it is surely possible from JR too.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...