Fixed generation of html text when uploading pdf by admin