Callback function receiving the document data when saving a document or a selection.

Syntax

function(<SaveDocumentResult> result)