Overview
Versions
Report Server Versions | Function Changes |
V11.0 | / |
V11.0.9 | Need Password was changed to File Password. |
V11.0.13 | File password supported custom password formulas. |
Function Introduction
It is mainly used when opening the exported PDF file from templates. A password input box is expected to appear, and only those who enter the correct password can view the content of the file. For this purpose, FineReport provides PDF template export attributes settings, which can protect the content of the file. The file password supports formula and string settings.
Settings
1. Click Template > Export Attributes > PDF, and File Password is not ticked by default, as is shown below:
2. If you tick File Password, you can set the password behind the text box.
3. If a password is set, a dialog box will pop up when opening the exported PDF, and only those who correctly enter the password can view this PDF file.
Passwords of Exported File Supporting Functions
Setting Method
1. Click Template > Export Attributes > Common, and tick Password supports formula, as shown in the following image:
2. Click Template > Export Attributes, tick File Password in PDFExport Attributes, and a file password setting text box will appear. You can set the formula password in it.
Range of Supported Functions
Function formulas supported by the file password are shown in the following table:
Common Functions & Trigonometric Functions | Date and Time Functions | Text Functions | Logical Functions | Report Functions |
SUM() | DATE() | CHAR() | AND() | COLCOUNT() |
COUNT() | DATEDELTA() | CODE() | BITNOT() | COLNAME() |
CHAR() | DATEDIF() | CONCATENATE() | BITOPERATIOIN() | FIELDS() |
DATE() Note: This function requires the parameter value to be date(number, number, number) | DATEINMONTH() | EXACT() | IF() | Decode() Note: Because passwords can only use English special characters and numbers, content after decode function should support those characters for using. |
MAX() | DATEINQUARTER() | FIND() | OR() | RECORDS() |
MIN() | DATEINWEEK() | LEFT() | REVERSE() | ROWCOUNT() |
TIME() | DATEINYEAR() | LEN() | TABLEDATAFIELDS() | |
ABS() | DATESUBDATE() | LOWER() | TABLEDATAS() | |
ACOS() | DATETONUMBER() | MID() | TABLES() | |
ACOSH() | DAY() | PROPER() | VALUE() | |
ASIN() | DAYS360() | REPEAT() | MAP() | |
ASINH() | DAYSOFMONTH() | REPLACE() | encode() | |
ATAN() | DAYSOFQUARTER() | RIGHT() | ||
ATAN2() | DAYSOFYEAR() | SUBSTITUTE() | ||
ATANH() | DAYVALUE() | |||
COMBIN() | HOUR() | |||
COS() | MINUTE() | |||
COSH() | MONTH() | |||
DEGREES() | MONTHDELTA() | |||
EVEN() | NOW() | |||
EXP() | SECOND() | |||
FACT() | TIME() | |||
GCD() | TODATE() | |||
INT() | TODAY() | |||
LCM() | WEEKDAY() | |||
LN() | WEEK() | |||
LOG() | WEEKDATE() | |||
LOG10() | YEAR() | |||
MOD() | YEARDELTA() | |||
ODD() | LUNAR() | |||
PI() | ENDOFMONTH() | |||
POWER() | ISWORKDAY() | |||
PRODUCT() | ||||
RADIANS() | ||||
RAND() | ||||
RANDBETWEEN() | ||||
ROUND() | ||||
ROUNDDOWN() | ||||
ROUNDUP() | ||||
SIN() | ||||
SINH() | ||||
SIGN() | ||||
SIGN() | ||||
SUMSQ() | ||||
TAN() | ||||
TANH() | ||||
TRUNC() |
Server Error of Exporting PDF with Passwords
Problem description:
When exporting PDF with passwords, it is normal on the local PC, but the following error message is displayed on the server:
java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1ObjectIdentifier"'s signer information does not match signer information of other classes in the same package
Solution:
During the project integration, the project itself referenced a JAR package from exported encrypted PDF, and FineReport JAR package also referenced it, resulting in a JAR package conflict error. You can directly delete the JAR package in the project to solve the problem.
Note: The name of the jar package exported by PDF with passwords varies with different versions of JDK.