Document transformer