Protecting PDF files and XDO.CFG

Posted by Greg Kelly on Oracle Blogs See other posts from Oracle Blogs or by Greg Kelly
Published on Wed, 12 May 2010 07:24:57 -0800 Indexed on 2010/05/12 15:36 UTC
Read the original article Hit count: 441

Filed under:
Protecting PDF files and XDO.CFG



Security related properties can be overridden at runtime through PeopleCode as all other XMLP properties using the SetRuntimeProperties() method on the ReportDefn class. This is documented in PeopleBooks. Basically this method need to be called right before calling the processReport() method:

.
.
&asPropName = CreateArrayRept("", 0);
&asPropValue = CreateArrayRept("", 0);
&asPropName.Push("pdf-open-password");
&asPropValue.Push("test");
&oRptDefn.SetRuntimeProperties(&asPropName, &asPropValue);


&oRptDefn.ProcessReport(&sTemplateId, %Language_User, &dAsOfDate, &sOutputFormat);

Of course users should not hardcode the password value in the code, instead, if password is stored encrypted in the database or somewhere else, they can use Decrypt() api

© Oracle Blogs or respective owner