add html/txt to pdf functionality