Callback function receiving the document data when saving a document or a selection.
function(<SaveDocumentResult> result)