BI Publisher Password Protect Documents

This is a very simple article explaining how to set the password security for the Documents sent using XML/BI Publisher .

It becomes essential to safeguard data of financial implication like Invoices , Statements or Remittance documents , when transmitting electronically .

This article explains how this can be achieved using BI Publisher .

 

 

 

Qns : What are the security Settings that can be set for PDF ?

Ans - > Following table explains some of the Security properties possible through XML /BI Publisher

 

 

 

 




2) Why and How  to set Password for PDF File sent through XML Publisher?

Ans : This feature is particularly useful when you are sending invoices or remittances docs  and you would like to safeguard the financial information .

 

I am explaining here the ways to achieve this using rtf template

There are 2 ways to achieve this , programmatically and through template at design time

 

Programatically:

        It can be done using java code by setting the properties using the code below            

        Properties prop= new Properties();

        prop.put("pdf-security", "true"); //  PDF security   control

        prop.put("pdf-permissions-password", "abc"); // permissions   assword

        prop.put("pdf-open-password","welcome");

        prop.put("pdf-encription-level", "0");  //encryption level

 

 

 

 

Pass the set properties to TemplateHelper Class

TemplateHelper.processTemplate(

appsContext,                           // AppsContext

applShortName,                      // Application short name of the template

templateCode,                         // Template code of the template

langCode,                                // ISO language code of the template

territoryCode,                         // ISO territory code of the template

dataInputStream,                    // XML data for the template

outputType,                             // Output type of the procesed document

properties,                              // Properties for the template processing

docOutputStream);                 // OutputStream where the processed document goes.

                                                }

 

 

Design  Time 

1)      Open the .rtf

2)      Go to File - > Properties

 

 Create a new custom property

a)  Name   : xdo-pdf-open-password

Type     : text

Value    : Either Hard Code the vale / or get the value for xml data

 

b)  Name :  xdo-pdf-security

Type   :  text

Value  : true

 

            Please Note : property name should always start with xdo- .

3) Once this is done , opening the PDF will prompt you for a password

 

 

请使用浏览器的分享功能分享到微信等