When rendering a report, various output options can be set using the Render Wizard. 
These options are stored in the report when you save and therefore apply on the server
also. If you want to modify the options, perhaps using dynamic parameters to control
them at render time, even on the server, then you need to write a little script.

This script in Report.OnRenderBegin will get the RenderDetails for PDF.

var rd = getRenderDetails("application/pdf");

If your JavaScript has a different scope, eg. within a component, you will need to use
something like:

var rd = Renderer.getRawReport().getRenderDetails("application/pdf");

It is possible that if this report has never been rendered into PDF that rd is null.
Therefore, you need to check and create if necessary like this:

importClass(Packages.com.elixirtech.report2.raw.model.RenderDetails);
var rd = getRenderDetails("application/pdf");
if (rd==null)
{
  rd = new RenderDetails("application/pdf");
  setRenderDetails(rd);
}

This will create a blank render details associated with the PDF mime-type ready for
you to fill in your options.

The rest of this document lists the options available for each mime-type. Each option
has an associated type hint, but all are actually strings. A Boolean is a string with 
the value "Yes" for true. Any other value is false. An Integer should also be passed 
as a String, eg. "72".

Set the value using this function:

rd.setParameterValue(name,value);

for example,

rd.setParameterValue("Encryption","Yes");

