Thursday, 16 July 2026

Password Protection in Oracle RTF File

Password Protection in Oracle RTF Report for PDF Output. 


Step: 1

    Add Password in the Select statement to pass the dynamic password to the document based on your requirement. Here i am giving example with Employee date of birth in DD-MON-YYYY format as dynamic password. 

Query : 

SELECT employee_number,

       full_name employee_name,

       to_char(date_of_birth, 'DD-MON-YYYY') pwd_date_of_bith

  FROM per_all_people_f

 WHERE sysdate BETWEEN effective_start_date AND

       nvl(effective_end_date, sysdate);


Step 2: 

    Develop report with Data model or RDF and generate the XML file. 

Ste 3: 

    With help of XML file, Develop a report in the as per the required format in RTF template. 

Step 4: 

    To enable the password, Open the RTF file

        Navigation: File --> Info --> Properties --> Advanced Properties -- Go to Custom and Add parameters and values




Password Protection: 

xdo-pdf-security - true

xdo-pdf-open-password - {/XX_EMP_DETAIL/LIST_G_EMPLOYEE_NUMBER/G_EMPLOYEE_NUMBER/DATE_OF_BIRTH}

DATE_OF_BIRTH is the field we are passing as dynamic password to the report. 


Add two parameter values and Save & Close and test.







No comments:

Post a Comment