Adjust format of document