Merge Events
Merge allows for script at each of several key steps or "events" during the processing of a job. The scripts are intended to provide processing to enhance the data presentment. Merge triggers the events both at the job level and during the processing of each document in the data file. For more information, refer to the The Merge Algorithm.
Event scripts are incorporated into the form. Common routines can be stored in a #include file and used by more than one form. Design enables you to associate the script with an event at the object, pane or form level.
this._value
" in the script. Access to the current document data is possible on only the DataMerged, PaginationCompleted, ReadyToPrint, StartNextPrintDriver, and EndOfDocument events. All others (marked with an * below) will access the Form itself, with undefined field values.Event | Description |
---|---|
* Data Filter Processing | Using the -filter option on the command line it is possible to run JavaScript against the incoming data stream to transform it into a compatible xml data file for merging. See the -filter option in Command Options - Merge for syntax. |
* Start of Job | Called once when Merge starts processing the job but before any documents. |
* Start of each Document | Called at the start of processing of each set of data. |
Data Merged | Called once the data and form have been merged together, prior to word-wrapping or pagination. |
Pagination Completed | Called at the completion of word-wrapping and pagination. |
Ready to Print | Called following the final processing of embedded fields and 'page n/m' fields, and once additional (blank) pages that result from duplexing have been inserted. The document is ready to begin printing. |
Start next Print Driver | Merge allows multiple print drivers to be called for each document. This event is triggered prior to each driver being called. |
End of Document | Called once all processing of the document is complete, and page and document counts have been updated. Merge is ready to flush this document and begin the next. |
Start of Summary | Called when Merge is ready to process a summary page, if required. The script must have used the _summary script functions to generate the summary data file. |
End of Job | Called once summary processing is complete. |
Finalize | Called once all processing is complete, and Merge is ready to exit. Exists only in Form object. |