fixed pdf from html document generation