Publishing Engine Programmer's Guide > PTC Arbortext Publishing > The Publishing Framework > The Outer Layer of the Publishing Framework > The Publishing Framework Callback Functions > The preprocess Callback
  
The preprocess Callback
This routine is called by the inner layer before it tackles any serious work. This callback is expected to initialize type-specific data in the parameter array, to perform type-specific error checks, and to perform any other necessary setup.
comp_type::preprocess_cb(doc, params[], interactive)
doc
is the document being published
params
is the parameter array
interactive
is set to 1 if the operation was invoked from the Arbortext Editor user interface
The callback can return:
-2
error detected, error message was logged
0
error detected, no message was logged
1
success, compose_for_type should continue processing
2
processing should continue, but compose_for_type should skip loading the default content pipeline parameters into the parameter array
The return code -1 is not used.