- 28 May 2024
- 1 Minute to read
- Print
- DarkLight
PDF proposal encryption
- Updated on 28 May 2024
- 1 Minute to read
- Print
- DarkLight
Learn how to use JasperReports encryption to password protect a quote proposal in .pdf format.
Configure password encryption
Option 1
<property name="net.sf.jasperreports.export.pdf.encrypted" value="true"/>
<property name="net.sf.jasperreports.export.pdf.128.bit.key" value="true"/>
<property name="net.sf.jasperreports.export.pdf.user.password" value="123456"/>
<property name="net.sf.jasperreports.export.pdf.owner.password" value="123456"/>
Option 2
<property name="net.sf.jasperreports.export.pdf.encrypted" value="true"/>
<property name="net.sf.jasperreports.export.pdf.128.bit.key" value="true"/>
<property name="net.sf.jasperreports.export.pdf.owner.password" value="123456"/>
<property name="net.sf.jasperreports.export.pdf.permissions.allowed" value="PRINTING"/>
Open an encrypted file
- Double-click the document in .pdf format.
- Enter a password.
After you open the file, you can add comments to the document, highlight the text, and print the document.
Configure file permissions
Block all permissions
Enter the following properties to enable a user to download a file with limited permissions. The user will not have to provide a password to open the document.
<property name="net.sf.jasperreports.export.pdf.encrypted" value="true"/>
<property name="net.sf.jasperreports.export.pdf.128.bit.key" value="true"/>
<property name="net.sf.jasperreports.export.pdf.owner.password" value="123456"/>
Block selected permissions
Enter the following properties to enable a user to print the file.
<property name="net.sf.jasperreports.export.pdf.encrypted" value="true"/>
<property name="net.sf.jasperreports.export.pdf.128.bit.key" value="true"/>
<property name="net.sf.jasperreports.export.pdf.owner.password" value="123456"/>
<property name="net.sf.jasperreports.export.pdf.permissions.allowed" value="PRINTING"/>
To configure specific permissions, read PDF Exporter Documentation .