Below I would like to share with you my own experience regarding the configuration of this feature:
Stop application server
Copy the encryption library bcprov-jdk14-139.jar that you can find in the attachment to the case to apache-tomcat/lib folder
Configure encryption in:
Your application server:
To do this please open jasperserver-proWEB-INFclassesjasperreports.properties configuration file and append to it four properties that I quote below, replace demo password with your own passwords
net.sf.jasperreports.export.pdf.encrypted=true net.sf.jasperreports.export.pdf.128.bit.key=true net.sf.jasperreports.export.pdf.user.password=123456 net.sf.jasperreports.export.pdf.owner.password=123456
This is application wide adjustment, all PDF documents will be encrypted with the same password. If you wish to disable encryption for a report simply set the net.sf.jasperreports.export.pdf.encrypted=false inside the report, also can set the other properties at report level
Your report:
to do this you just need to add to your report the same four properties listed above
- Start application server
The configuration above has been tested with the approach a), PDF encryption in your application server..
Please test it in the test environment before applying it in the production.
To read more about the aforementioned properties please download the document JasperReports Ultimate Guide and check the chapter ENCRYPTED PDF
Recommended Comments
There are no comments to display.