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

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22816976/viewspace-1328680/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22816976/viewspace-1328680/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值