prepare to convert document