remove \r from json passed to pdf