Configuring the Design Center Project > Preparing document previews > Creating output connectors for document previews (optional)

Creating output connectors for document previews (optional)
To use customized drivers or fonts when previewing documents, you must manually create the preview output connectors and use scripting functions to select the appropriate preview output connector depending on content type.
Note:
For each enabled preview format (Print, Email, and Web), there must be a preview output connector available. The web and email formats can share the same preview connector. There must also be a preview output connector for the template preview.
At a preview service request, the actual connector is not invoked – only the driver is applied. If you want to use the same driver settings for previews and for final deliveries, you can reuse the delivery output connectors. As an alternative, you can create output connectors dedicated for the previews. For example, by using connectors of the type NULL Connector.
Prerequisites
When service-enabling the Message, the Use default preview connectors option must be cleared. See Service-enabling the Message.
For document previews in Print (paginated) format:
Driver – PDF
For performance reasons, we recommend the setting Use compression: Yes.
Content type – application/pdf
For document previews in Email/Web (unpaginated) format:
Driver – HTML unpaginated
For template previews:
Content type - image/tiff
To create and select preview output connectors
1
2
Example 3
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 company wants to preview examples of documents both in print format and email/web format. An array is used to deliver final documents as printed output, emails, and web output.
The Design Center Platform includes the following output connectors:
PreviewPDF – For the print preview in Composition Center.
PreviewHTML – For the email and web previews in Composition Center.
PreviewTIFF - For the template preview in Composition Center.
FileOUT – For the final release of printed output.
EmailOUT – For the final release of emails.
WebOUT – For final release of the web output.
In the Runtime configuration, the Message is service-enabled, and the Use default preview connector option is cleared.
In the Runtime Connector Selection Method dialog box, a variable called $connector[*] is used to select output connector.
The script below is run before the Process and selects the output connectors to be used. In the script, a variable called $connstr is used to log the used output connectors.
if (IsPreview())
{
$ContentType = GetRequestedPreviewContentType();

if (GetPreviewTypeEx() == 1)
{
if ($ContentType == "image/tiff")
        {
$connector[0] = "PreviewTIFF";
          $connstr = $connector[0];
        }
}

else if (
GetPreviewTypeEx() == 4)
{
if ($ContentType == "application/pdf")
{
$connector[0] = "PreviewPDF";
$connstr = $connector[0];
}
else if ($ContentType == "text/html")
{
$connector[0] = "PreviewHTML";
$connstr = $connector[0];
}
}
}
else
{
$connector[0] = "FileOUT";
$connector[1] = "EmailOUT";
$connector[2] = "WebOUT";
$connstr = $connector[0] + ", " + $connector[1] + ", " + $connector[2];
}
preproclog(0, " **** OUTCONNECTOR : " + $connstr);
 
 
Related topics
Configuring preview output connectors manually in the Ad Hoc Correspondence and Correspondence Reviewer documentation
Preview functions in Scripting Reference Guide
OpenText StreamServe 5.6.2 Updated: 2018-01-26