FOM Reference > Content > Events > fPublishEvents interface
  
fPublishEvents interface
This object defines events that can be triggered during formatting or printing.
FormatPageEndReturnTypes enumeration
Possible return values that should be used from the formatPageEnd function.
The FormatPageEndReturnTypes enumeration has the following constants of type int.
RETURN_NORMAL = 0
Continue formatting the document as normal.
RETURN_RETRY = 1
Retry formatting the current page, returning to the point where the formatPageStart function is called.
RETURN_HALT = 2
Stop formatting the document.
formatEnd attribute
This function will be called when formatting ends.
formatEnd
Access
read-write
Returns
Object
formatPageEnd attribute
This function will be called at the end of a page during formatting. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = pos (int)
[1] = currentPage (fPage)
[2] = retryCount (int)
The return value from this function can be used to determine if the page should be retried or if formatting should be cancelled. Possible return values are specified in fPublishEvents.FormatPageEndReturnTypes. The page can only be retried a maximum of 10 times, if this function returns fPublishEvents.RETURN_RETRY an 11th time, it will be ignored and formatting will continue on the next page.
formatPageEnd
Access
read-write
Returns
Object
formatPageStart attribute
This function wll be called at the start of a new page during formatting. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = pos (int)
[1] = currentPage (fPage)
formatPageStart
Access
read-write
Returns
Object
formatStart attribute
This function will be called when formatting starts.
This function will be called with the following arguments:
[0] = currentFormat (fFormat)
formatStart
Access
read-write
Returns
Object
printEnd attribute
This function will be called when printing ends.
printEnd
Access
read-write
Returns
Object
printPageEnd attribute
This function will be called at the end of a page during printing. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = pos (int)
[1] = currentPage (fPage)
printPageEnd
Access
read-write
Returns
Object
printPageStart attribute
This function will be called at the start of a new page during printing. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = pos (int)
[1] = currentPage (fPage)
printPageStart
Access
read-write
Returns
Object
printSheetEnd attribute
This function will be called at the end of a sheet during printing. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = sheetNo (int)
[1] = firstPos (int)
[2] = lastPos (int)
[3] = currentFilename (fPath)
printSheetEnd
Access
read-write
Returns
Object
printSheetStart attribute
This function will be called at the start of a new sheet during printing. This function is not called during a page reflow or redraw.
This function will be called with the following arguments:
[0] = sheetNo (int)
[1] = firstPos (int)
[2] = lastPos (int)
[3] = currentFilename (fPath)
The return value should be the filename to use for this sheet. If it is the same name or null, printing continues to that file. If the name is non-null and different, the previous file is closed and printing starts in the new file, overwriting the old file if it already exists. If the file frequency is set to fPrinter.FILE_NEW_PER_PAGE or fPrinter.FILE_NEW_PER_RANGE, the files will still automatically get closed at the end of each page or range accordingly.
printSheetStart
Access
read-write
Returns
Object
printStart attribute
This function will be called when printing starts.
This function will be called with the following arguments:
[0] = currentPrint (fPrint)
printStart
Access
read-write
Returns
Object