Document splitting with callback fn per document.