2.16.4 Terminating a Print Job

If you send output to a device with the NEWFRAME escape, you are then required to write a termination procedure and supply it with the application. The SETABORTPROC escape sets a pointer to this procedure; it should be called prior to the STARTDOC escape. The ABORTDOC escape terminates print jobs if it is called before the first call to NEWFRAME. It should also be used to terminate jobs that use the NEXTBAND escape.