[PDF] Parameterizing Render Details

This recipe shows all the available RenderDetails in PDF.

More RenderDetails properties can be found in .\Repertoire\docs\RenderDetails.pdf

  1. Create a report template (Label.rml).
  2. Define parameters as shown in “Report > Parameters” page.
  3. Enter the following script into “Report Properties > Scripts > On Render Begin”:rd = this.getRenderDetails(“application/pdf”); // choose mime-type here
    if (rd==null) // no render details for this mime-type stored
    {
    // create a RenderDetails for the right type and add it to the report
    rd = new RenderDetails();
    rd.setMimeType(“application/pdf”);
    report.addRenderDetails(rd);
    }
    rd.setParameterValue(“RenderAsImage”,Properties.getProperty(“PDFrenderAsImage”));
    rd.setParameterValue(“OwnerPassword”,Properties.getProperty(“PDFOwnerPassword”));
    rd.setParameterValue(“UserPassword”,Properties.getProperty(“PDFUserPassword”));
    rd.setParameterValue(“Encryption”,Properties.getProperty(“PDFEncryption”));
    rd.setParameterValue(“EncryptionStrength”,Properties.getProperty(“PDFEncryptionStrength”));
    rd.setParameterValue(“AllowModifyContents”,Properties.getProperty(“PDFAllowModify”));
    rd.setParameterValue(“AllowCopy”,Properties.getProperty(“PDFAllowCopy”));
    rd.setParameterValue(“AllowPrinting”,Properties.getProperty(“PDFAllowPrinting”));iterList = rd.getParameterIterator();
    while (iterList.hasNext())
    {
    temp = iterList.next();
    println("*** " + temp.getKey() + " : " + temp.getText());
    }

To download the necessary files for this recipe, refer to the attached ZIP file.
Parameterizing-RenderDetails.zip (5.1 KB)