Package com.crystaldecisions.sdk.plugin.desktop.pdf

This package allows you to view reports formatted as a PDF document.

See:
          Description

Interface Summary
IPDF This interface contains the mime type identifying it as a PDF formatted report, and the byte stream to pass to the Response object so it can be displayed in the proper format on the HTML page.
IPDFBase This interface contains the mime type identifying it as a PDF formatted report, and the byte stream to pass to Response object so it can be displayed in the proper format on the HTML page.
 

Package com.crystaldecisions.sdk.plugin.desktop.pdf Description

This package allows you to view reports formatted as a PDF document. When the report runs, it creates a CrystalEnterprise.Pdf object in the APS InfoStore. After retrieving the plugin for this object, you can set the ContentType Property of the Response object to match the value returned by the getMimeType() method and pass the ByteStream returned by getContent() to the OutputStream of the Response object. The report is then streamed to the browser and previewed as a PDF document.

Retrieving desktop plugins

Each object that is created with a desktop plugin is stored in either the CI_INFOOBJECTS or the CI_SYSTEMOBJECTS category in the APS InfoStore, and is marked with a programmatic identifier (ProgID). Using SI_PROGID, you can query the APS InfoStore for a collection of objects.

Example

The following query selects the names, and IDs of all PDF objects in the APS:

IInfoObjects objs = iStore.query("SELECT SI_NAME, SI_ID FROM CI_INFOOBJECTS WHERE SI_PROGID='CrystalEnterprise.Pdf'");

The query method returns a collection of InfoObjects, which in this case are PDF plugin objects. Like other InfoObjects, these objects are uniquely represented by their ID property. For each object in the collection, you can access general InfoObject properties, such as the SI_NAME property, SI_DESCRIPTION property, and SI_ID property.

To access the IPDF objects returned by the query, the resulting IInfoObjects need to be cast. This example demonstrates how to cast the returned IInfoObjects as IPDF objects.

for ( int i = 0; i < objs.size(); i++ )
{
    IInfoObject obj = (IInfoObject) objs.get( i );
    IPDF pdfPlugin = (IPDF) obj;
}