You may have seen multiple postings regarding how to set a password on a PDF file created with XML Publisher by modifying the XDO.CFG file. While this does provide some protection, it sets the same password on ALL pdf's.
In PeopleTools 8.50 the reporting development team incorporated this feature in the Report Definition page, see the graphic below.
To further enhance this capability, 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:
Sample code snippet ...
&asPropName = CreateArrayRept("", 0);
&asPropValue = CreateArrayRept("", 0);
&oRptDefn.ProcessReport(&sTemplateId, %Language_User, &dAsOfDate, &sOutputFormat);
Of course users should not hardcode the password value in the code, instead, if the password is stored encrypted in the database or somewhere else, they can use Decrypt() api
See the online PeopleBooks here for more information:Hosted PeopleBooks
You can read more about the configurable options in the Oracle Business Intelligence Publisher User's Guide HERE
I would be interested in learning of your experiences with this feature (click the feedback link on the main PeopleTools blog page), thanks.