Text based document generation