Include additional pages for stack, envelope, or document
The following exit points are available to add separator pages before a stack, envelope, or document:
- OnStackStart
- OnEnvelopeStart
- OnDocumentStart
The following exit points are available to add separator pages after a stack, envelope, or document:
- OnStackEnd
- OnEnvelopeEnd
- OnDocumentEnd
To configure the context for the exit points, follow these steps:
- In the
Navigator lower pane, find and double-click
CCM_Streaming.
The process appears in the central pane.
- Click
Streaming in the lower central pane.
- In the
Action section on the right, set the relevant parameters to a script that has
the
StreamingUnit context.
When the parameters are set, the configured script is called automatically whenever a stack is processed.
To create and modify the scripts, use the functions and variables listed in Properties of the StreamingUnit context.
Example script
Try
Label = GetOrganisationalMetadata ("Label")
OnError()
Label = "Generic Corporate Brand"
End-Try
If (HasSender)
Label = Label + " :: " + GetSenderData ("Department")
End-If
If (HasRecipient)
Agent = GetRecipientData ("AgentName")
End-If
Page = stream.LoadDocument ("C:\Templates\Banner.pdf", OdinDuplexSetting.Simplex, "blank", "blank")
Page.EditPage (0)
Page.SetFont ("Courier New", 12)
Page.TextOut (75, 51, Label, false, false)
Page.TextOut (75, 60, Agent, false, false)
Page.Post()
stream.AppendDocument (Page, false, false)
This example loads the
Banner page stored in the
PDF format from the
C drive, inserts the retrieved fields, and then appends the page as a separator page to the output
stream.