New to Telerik Reporting? Download free 30-day trial

How to Expand the PDF Reader's Bookmarks pane on opening a PDF file produced by Telerik Reporting

Environment

Product Progress® Telerik® Reporting
Rendering Format PDF
3rd Party Application Adobe Acrobat, Adobe Reader

Description

When you create Telerik Reports you can provide internal navigation in the report via Document Map. This interactivity feature is supported by Adobe PDF Readers and it can be controlled by adding Adobe JavaScript in the PDF produced by the Reporting engine.

Solution

  • The Adobe JavaScript that is needed is as follows:
app.execMenuItem('ShowHideBookmarks')
var deviceInfo = new System.Collections.Hashtable();
deviceInfo["JavaScript"] = "app.execMenuItem('ShowHideBookmarks')";
Dim deviceInfo As New System.Collections.Hashtable()
deviceInfo.Add("JavaScript",  "app.execMenuItem('ShowHideBookmarks')")
<configuration>
  <configSections>
    <section
        name="Telerik.Reporting"
        type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting, Version=x.x.x.x, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
        allowLocation="true"
        allowDefinition="Everywhere"/>
  </configSections>
  …
  <Telerik.Reporting>
    <extensions>
      <render>
        <extension name="PDF" >
          <parameters>
            <parameter name="JavaScript" value="app.execMenuItem('ShowHideBookmarks')"/>
          </parameters>
        </extension>
      </render>
    </extensions>
  </Telerik.Reporting>
  …
</configuration>

In the above code snippet, you need to replace x.x.x.x with your version of Telerik Reporting e.g. 15.1.21.512.

Notes

The configuration settings valid for your Telerik Reporting version can be checked in the local help resources (CHM file) of the corresponding version.

In this article