Design Center configurations > Platform configuration > Configuring preview output connectors manually > Selecting preview output connectors

Selecting preview output connectors
Prerequisites
The preview output connectors and the output connector for the final release are created.
To select preview output connectors
You can use the scripting functions below to decide if an invocation is a preview service request. If it is a preview service request, you can select the appropriate output connector depending on content type.
See Example 2.
Example 2
A company wants to use settings other than the ones used by the default preview output connectors, which means they must manually create and select the preview connectors.
The Design Center Platform includes the following output connectors in the production layer:
PreviewTIFF – For the preview in Ad Hoc Correspondence. The application requires content type image/tiff.
PreviewPDF – For the preview in Correspondence Reviewer and Composition Center. The applications require content type application/pdf.
FileOUT – For the final release of the document.
In the runtime configuration, the Message is service-enabled, and the Use default preview connector option is cleared.
The script below is run before the Process and selects the output connector that is used.
if (IsPreview())
{
$ContentType = GetRequestedPreviewContentType();

if (GetPreviewType() = 1)
{
if ($ContentType = "image/tiff")
{
$connector = "PreviewTIFF";
}
else if ($ContentType = "application/pdf")
{
$connector = "PreviewPDF";
}
}
}
else
{
$connector = "FileOUT";
}
preproclog(0, " **** OUTCONNECTOR : " +$connector);
 
 
Related topics
Preview functions in the Scripting Reference
OpenText StreamServe 5.6 Updated: 2013-03-01