add NewDocumentFromReader, closes #20